Home Download Buy Blog Forum Support

SublimeJSONColorSchemeEditor - GUI edit syntax colors

Re: SublimeJSONColorSchemeEditor - GUI edit syntax colors

Postby facelessuser on Fri Mar 29, 2013 2:18 pm

robertcollier4 wrote:Looking nice already. Making GUIs in python is something I haven't done but am interested in learning. Which GUI library are you using? The default tkinter or something like wxpython? Also, what do you think about something like this? ObjectListView:
http://www.blog.pythonlibrary.org/2009/ ... -listctrl/

After playing with editing themes in a GUI, here are a couple things that I think would be nice:
1. Allow sorting via the scope column.
2. Allow loading of a .tmLanguage file which would show which color scheme scope each language definition matches up to - this would also allow a user to easily see if certain langauge rules that they have currently defined might be going unused with their current color scheme. This would help .tmLanguage creators to define scope rules that best work with a variety of 3rd-party color schemes.


I am using wxpython. Specifically I am using wxFormBuilder to create the GUI. The latest beta of wxFormBuilder is pretty good on Mac (there are still a few bugs on mac though), but a little buggy on windows, but I usually work around the bugs on windows. The interface for building GUIs is the best I have seen for wxPython, the downfall is that it is a bit buggy. It basically allows you to visually build GUI classes, and you just generate the code and derive your class from the generated code (you don't directly modify the generate code).

1. Sorting is a bit funny, because you may or may not have realized that the order of the color entries is important as well. Global settings are not order dependent, but the scope entires are. Right now in my python version, it dynamically displays the global stuff, and the scope stuff. It also allows you to modify the order. I will be adding the ability to insert new records or delete records next. Lastly I will add actual modification support, right now it just allows you to reorder stuff and view it. There are possibly interface aspects that will change as I get closer to finishing; right now it is just a rough prototype.

2. I may look into this further down the road, but right now, I just am looking to allow basic editing and visualizing right now.

Very rough prototype screenshot (visually stuff will probably change as I get closer to completion). Basically, you can view all of the attributes, and if you press "alt+up" or "alt+down" while on a row, that row will move up or down respectively. Global list is on top, scope list is on bottom. The only thing missing is global settings that don't use a color setting:
Screen Shot 2013-03-29 at 7.48.36 AM.png
Screen Shot 2013-03-29 at 7.48.36 AM.png (76.81 KiB) Viewed 1109 times
facelessuser
 
Posts: 1565
Joined: Tue Apr 05, 2011 7:38 pm

Re: SublimeJSONColorSchemeEditor - GUI edit syntax colors

Postby facelessuser on Fri Mar 29, 2013 2:42 pm

Can now handle all global settings. Also sizes better now. That is it until after work today.
Screen Shot 2013-03-29 at 8.13.44 AM.png
Screen Shot 2013-03-29 at 8.13.44 AM.png (82.97 KiB) Viewed 1134 times
facelessuser
 
Posts: 1565
Joined: Tue Apr 05, 2011 7:38 pm

Re: SublimeJSONColorSchemeEditor - GUI edit syntax colors

Postby facelessuser on Fri Mar 29, 2013 3:22 pm

Okay one more :) (better layout)...now I need to get ready for work:
Screen Shot 2013-03-29 at 8.54.40 AM.png
Screen Shot 2013-03-29 at 8.54.40 AM.png (89.47 KiB) Viewed 1129 times
facelessuser
 
Posts: 1565
Joined: Tue Apr 05, 2011 7:38 pm

Re: SublimeJSONColorSchemeEditor - GUI edit syntax colors

Postby facelessuser on Sat Mar 30, 2013 9:11 pm

I am getting close to being able to release a beta of this on at least Windows and Mac. It is able to edit pretty much everything. I still need to add the ability to create new rules and delete old ones. But one thing it does pretty nice is simulate how Sublime does transparency so you will know exactly what the colors will look like in Sublime. It will tap into the systems color picker dialog as well, but since most don't access alpha, right now you can just manually tack on the alpha when you pick the color. If I am not too busy, I may have the beta out this weekend.

Image
facelessuser
 
Posts: 1565
Joined: Tue Apr 05, 2011 7:38 pm

Re: SublimeJSONColorSchemeEditor - GUI edit syntax colors

Postby Grant on Mon Apr 01, 2013 1:11 pm

@facelessuser Looks slick and simple. Any chance you'll post the source code on Github for the rest of us to learn from (make sure you include a license)?
Grant
 
Posts: 68
Joined: Fri Jan 20, 2012 2:42 pm

Re: SublimeJSONColorSchemeEditor - GUI edit syntax colors

Postby facelessuser on Mon Apr 01, 2013 1:34 pm

Yeah, I will post the source for sure as soon as I clean it up. Probably not right away, but eventually. I should be releasing a workable beta sometime today for windows and mac (I haven't compiled and tested the linux one(s) yet) but I should have a 32bit windows (that can be run on 64bit or 32bit windows), and a Mac one.

Linux will come when I have time to boot up a virtual machine and try it out.
facelessuser
 
Posts: 1565
Joined: Tue Apr 05, 2011 7:38 pm

Previous

Return to Plugin Announcements

Who is online

Users browsing this forum: No registered users and 5 guests