New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
theme dev talk #101
Comments
@ lukefromdc
Yes, there are a lot of themes. But most of them are sister themes which are only different in color scheme. Well i like to port BlueMenta for myself because i want to learn what i have to change. And thank you again for your efforts. |
I just added a mostly complete port of Green-Submarine. Basically usable but probably needs more work. Picked this one so you can fine-tune it for Blue-Submarine. OK, we've now got one light theme and one dark theme usable enough for GTK 3.19/20 testing if nothing else. I only use a limited set of apps, plus check them in gtk3-widget-factory and gtk3-demo, same as my own theme but without the long-term day to day use that always seems to turn up the minor issues. |
Phew, fist raw port for BlueMenta is done, now i can go in details to check if all stuff is working like it should. |
PS: i didn't remove the old obsolete selectors for the moment, so we can use this as references for other themes. |
I just added a new branch to my repo with some Green-Submarine fixes. https://github.com/lukefromdc/mate-themes/tree/Green-Submarine-fixes-gtk3.20 Working on those toolbar.primary-toobar selectors right now, will then see if I can do anything about the jumping. The linked-button code is very complex so no guarantees. If you know the offending widgets though, new jumping on a gtk3.19 port is almost always caused by a border that is present in one widget state and absent in another, in a few cases by a missing minimum-width or minimum-height. Only with treeview separators was the latter the culprit in my work, the rest was borders |
A quick check of BlueMenta here shows it basically working but with some On 1/29/2016 at 3:46 PM, "Wolfgang Ulbrich" notifications@github.com wrote:
|
See mate-desktop/caja@5b56a80 Works well with 3.20, i think we need to add more style classes like this for old classes CajaNavigationWindow and CajaDesktopWindow at the top of the tree. |
Once toplevel windows are labelled this way, widgets within them are a lot easier to single out, only needing their own style class if it is necessary to distinguish between them in the same app, such as Caja navigation windows vs the Caja desktop. |
I've added some more style classes , see latest commits at caja master. I noticed that the .view class for IconView (navigation-window) doesn't work with 3.20, but adding a class 'fm-icon-container' does not help. |
The .view situation works like this: in gtk3.20, that custom icon-view widget is always transparent. If you look at it in gtk-inspector, the style class is in fact being applied but it is now a backgroundless, always transparent widget, possibly by becoming a "windowless" widget that simply draws its foreground over whatever is beneath. Thus a background cannot be set for it. Anything else set with .view still works, such as the rubberband theming if not otherwise explicitly themes. Therefore, the only way to set the background is to set it on something underneath the iconview, the scrolled window is the first one underneath. This can put boxes over the scrollbars in list views, however. The only solution I can think of would be to put a frame or some such thing inside the scrolled window, then put the FMIconView inside that. Either leave it out for the desktop or use the navigation window theme class to override an otherwise transparent BG for it so as not to get an opaque background over the desktop background. Right now I am using the scrolled window to take the background and putting up with the list view scrollbar white box on top. |
OK, understand, we have to live with it for the momment. |
The Caja trashbar can be themed by the # widget name #caja-extra-view-widget , On 2/1/2016 at 8:02 PM, "Wolfgang Ulbrich" notifications@github.com wrote:
|
Thanks for the hint. |
Yes I do, that has been going on since the beginning of GTK3.19, but I figured On 2/2/2016 at 12:32 PM, "Wolfgang Ulbrich" notifications@github.com wrote:
|
I just tested the latest BlueMenta, it's coming along nicely but some builtin icons On 2/2/2016 at 12:32 PM, "Wolfgang Ulbrich" notifications@github.com wrote:
|
I added min-witdh for check/radio buttons, i never known that, thx. |
I do not know the name of the one in gtk3-widget-factory, it does not come up One tip: I find that different themes with the same icon theme give different results, On 2/3/2016 at 11:20 AM, "Wolfgang Ulbrich" notifications@github.com wrote:
|
Be advised that there were enough changes in today's version (2-4-2016) of BlueMenta, Green-Submarine, and BlackMATE didn't get any new panel issues, The big change was that all those widgets with no name now get a css node name EDIT: This selector works for singling out the panel drag handles/grips without matching anything else it seems: #PanelPlug>#PanelApplet>widget>widget |
The panel tray and window list grips were also made transparent by today's window.mate-panel-menu-bar>widget>widget>widget.mate-panel-menu-bar>widget These selectors work ONLY with gtk3.19.8 built after today's changes but were On 2/3/2016 at 11:20 AM, "Wolfgang Ulbrich" notifications@github.com wrote:
|
Got the panel tray icon padding working again for gtk3.19.8 with this code: |
Do you see the name 'widget' in gtk3-inspector? Btw., what's the different of using (>)
and
in general for theming? I noticed also a change with spinbuttons. 'spinbutton entry' is working again. See changes in BlueMenta from today. |
I forgot to say the 'grips' i can style in BlueMenta with
|
The difference between #PanelPlug>#PanelApplet { } and #PanelPlug #PanelApplet { } The "widget" css node works ONLY with versions of gtk3.19.8 built after a commit that https://git.gnome.org/browse/gtk+/commit/?id=f7ec9c98ef0ef8740c93f96af9d971b0211118c1 "Now selecting a widget by class name no longer works. This is probably most relevant for users outside of GTK that want to On 2/5/2016 at 11:48 AM, "Wolfgang Ulbrich" notifications@github.com wrote:
|
Ahh, understand the different now, thx. |
GTK Inspector just got harder to use. The no longer used widget names are now While it is also possible to add css node names directly, that is a gtk3.20 and later Basically, old stuff no longer used withing gtk3.19 is being cleaned out it seems, On 2/6/2016 at 1:52 AM, "Wolfgang Ulbrich" notifications@github.com wrote:
|
What version of Nemo were you using for this commit? .nemo-window does not work with the 2.8.6-1 version in Debian Unstable, and on the Nemo github page I could not find any reference to a commit adding this style class. I suspect it will work in the future though, as Nemo/Cinnamon devs will encounter GTK 3.20 with Debian Unstable probably in May and Ubuntu 16.10 development versions at a similar time. If Mint goes with the Ubuntu LTS again though, they won't actually NEED it to work in their own distro for two years. The version of Nemo I have can be styled-but only with the long widget chains. EDIT: gtk inspector confirms this style class not present on Nemo 2.8.6-1 from Debian Unstable. |
Noticed a Fixme in BlueMenta for progressbar minimum height and widgth: within the relevant selectors. Had to read the actual gtkprogressbar.c source to find this out! |
As linuxmint does not have a focus for gtk+ > 3.18, i helped out with a patch for fedora rawhide. Thanks for the hint for progressbars. |
I applied just the nemo_style-classes.patch from there to nemo 2.8.6, it works. Adjusted my theme to it to prevent accidental matches to anything else, figuring it's better to tell users to use a patched build Nemo from the same website (it will go there when the next theme version does) than to have to deal with accidental matches to anything else. Hope that patch goes upstream, I don't want to have to bring those widget chains back. For now I just dumped the modded files into /usr/src and the origin of both the patch and the source download into the changelog so distribution of the Debian package will meet GPL requirements. EDIT: I just set up this github fork to make the finished code more accessable and easier to maintain: |
Check and radio boxes also appear in website content and in extension preference dialogs (notably NoScript). Used this code to fix them in my theme, had to split them out from two-part animated checkboxes used elsewhere as a background image can't be used under them in Firefox:
Got simliar results fixing scrollbars with .slider, now working on many other theme elements. When I get this done, I will then do the same for BlackMATE, and this will be a guide for fixing these in other themes |
Why .check:active:hover ? |
Simply copied from what I had been using before, the way many themes On 4/27/2016 at 3:56 PM, "NO NAME" notifications@github.com wrote:
|
I just uploaded the updated version of UbuntuStudio_Legacy with support for GTK3 Firefox to my usual Archive repo at: When it is superseded and moved into Old_Versions the above link will break but the package will remain available in https://archive.org/download/DebianPackagesForMate-desktopWityGtk3AndCustomPanelTheme/Old_versions I would put this stuff on Github but I do not know how to set up makefiles for the normal build system, I might put it there anyway with an INSTALL file explaining that it is only necessary to copy the whole directory into /usr/share/themes and set the correct permissions. |
@monsta |
I can try, but I don't know what should be built with it 😄 |
The mate-themes include a makefile that guides the installation process. Without that, "make install" can't install the theme files, and more importantly On 4/28/2016 at 6:36 AM, "monsta" notifications@github.com wrote:
|
I just found out why Yelp(help browser) is so hard to theme. Everything in the view contained in it gets hardcoded colors calculated from the base color, the text color-and indirectly from the link color. Yelp makes a temporary link button and uses it's style context to get the color for the text in the (usually)blue box. NOTHING else can theme it, as the application overrides the GTK defaults. Works OK in all the MATE themes as it stands, though in Green-Submarine-the text in the inner box (blue in most themes) is too bright and could use some darkening as described below. On the other hand, I was getting white text in the light blue box in Ubuntustudio_Legacy. Until GNOME fixed a bunch of style context warnings I got the selected bg color on yelp and at least everything was readable. When that was fixed for 3.20 I had to do some digging. I found it uses the fg color set on a link button, but NOT the color set on a label on a link button, which is what you actually see on a link button! On a theme with dark backgrounds but light views, this will default to a light color and make Yelp nearly unusable unless you know where to fix it. I set a "fake" link button color just for Yelp, which uses the fg color of the link button itself, then set the color for the label on a real link button to another, lighter value and everything worked. I get the link button labels I want, yet Yelp gets the darker color. For some reason color inheritance often fails for child widgets, but just in case it decided to work after an update, I themed button.link.text-button first, then themed button.link.text-button label, button.link label directly underneath it. I learned all this digging through Yelp source code with the intention of fixing it there and forking it to my account, then submitting a PR that GNOME would be sure to ignore. Found it could be fixed in themes-and quite independently of what you really want to put on a real link button due to this phony style context. Needless to say, I never saw any documentation of this wierdness. |
Has anyone found a selector that works for the Firefox history menu that looks like a popover but ignores popover, .popover, .modelbutton, .menuitem etc? |
You can try to use obsolete mate-themes-extras as template which is more simple and use index.theme files directly. |
I guess you mean the context menu from * address bar*. Looks like a combobox for me, or old comboxentry which is dropped with 3.20. |
Yes, tthat's the one: the history menu from the ittle clock icon on the On 5/2/2016 at 2:11 PM, "NO NAME" notifications@github.com wrote:
|
That's ANOTHER one, and again the hovered item ignores the theme On 5/2/2016 at 2:45 PM, "NO NAME" notifications@github.com wrote:
|
OK, got it :) |
Maybe you find a hint here https://developer.gnome.org/gtk3/stable/GtkPopover.html |
As usual, the popover css node style is ignored in Firefox, and no .menu:hover .menu menuitem:hover and even .menu *:hover are all On 5/2/2016 at 3:25 PM, "NO NAME" notifications@github.com wrote:
|
I just added https://github.com/lukefromdc/gtk-theme-ubuntustudio-legacy to my repo containing the "UbuntuStudio_Legacy" GTK theme, which is an otherwise medium dark theme with white views. For now no MakeFiles are present as I have yet to figure them out, but it can be installed by simply dragging the entire directory into /usr/share/themes and setting the permissions correctly. Found these directions for getting around the GIT errors that had stopped me until now on StackOverflow:
I hope the fact that the original UbuntuStudio theme was published under Creative Commons Attribution-ShareAlike 2.5 License Agreement and the later themes used to get things working under GPL v3 does not create compatablity issues that prevent redistribution by MATE or on Github. I have little understanding of that sort of thing and NO ability to resolve it beyond asking the UbuntuStudio development email list if anyone objects. I will continue to use the theme myself with or without redistributability. Due to contributions from others under two different licenses I dual-licensed my own contributions (now the bulk of the code) under both licenses, but am NOT concerned about which license, any, or none my own contributions must be licensed under and have no objection to relicensing my own contributions. Very little is left of any of the GPLv3 themes I got help from, could resort to "fair use" for those cases if I need to relicense/dual license my own contributions. Public domain fine for my own part of the work. Most contributions from e17GTK are to GTK 3.18 and earlier, as GTK3.20 forced a radical rewrite. |
Some questions: |
I added the necessary make and configure files at the forked repo. |
Done, feel free to ask me if you have questions. |
You should find now those settings in ~.gitconfig. |
I forgot to tell, this is the explanation from gtk+ dev M.Clasen why we can't use gtk3-inspector for firefox.
|
Thanks, I really appreciate this. Merged your changes back to my repo and got a successful buiild and install the same way I do the MATE themes, so that works. Debian package built and installed fine, it's at https://archive.org/details/DebianPackagesForMate-desktopWityGtk3AndCustomPanelTheme superseding previous versions due the the change to dual licensing my own contributions under both licenses used by others As for the theme name, that's what I've always used in /usr/share/themes, didn't know of any other name to use. Future work might be to add a "blue" version with the original UbuntuStudio blue color and keep the "green" version in which case the internal names would have to reflect that. This would go well with the "Traditional" and "Submarine" themes which both have blue and green versions. I already have most of the needed image assets for this. Bumped the version to 3.21.1 to match the maximum supported GTK version the way MATE themes are versioned-and because published versions on Archive had already reached 2.1.4 over the years. Versioning took over from UbuntuStudio's version 0.28 with an 0.3 back in March 2011 that was my first rough GTK3 port. New packages start with 0.1, but in this case that would have been UbuntuStudio's first theme experiments as this is a follow-on. Next up: the UbuntuStudio-Legacy icon theme and more BlackMATE/Gedit experiments |
I added a style class .tooltip to marco. |
Et voila, |
Ok, i fixed that for BlackMATE too, feel free to adjust the settings. |
Just found that GreenLaguna's window controls work in Gedit. The key is that GreenLaguna uses headerbar unconditionally, not headerbar.titlebar as the selector. I first themed all CSD controls in UbuntuStudio_Legacy to match SSD apps for the first time, then applied this to BlackMATE with |
I opened a new topic for communication. |
themes needs a rewrite to 3.20
The text was updated successfully, but these errors were encountered: