Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Stylizing GtkNotebook Tabs in Theme (gtkrc)
#11
(06-17-2020, 10:06 PM)migf1 Wrote: Thank you very much Zero01!

Are you using it on Windows or Linux?

Windows 2.8 & 2.10..!

           
Reply
#12
They look as intended. I see that you have even enabled the menu icons on the first image. Unless you loaded a different theme without restarting Gimp (menu icons will go away when you restart Gimp).

If you want to permanently enable the menu icons for a theme, edit its gtkrc file and replace 0 with 1 in the the following line:

gtk-menu-images = 0

Thanks again for the feedback Zero01!
Reply
#13
(06-17-2020, 09:03 PM)migf1 Wrote: Ok guys, here it is. I am attaching a zip file, containing the regular and the small variants of the Dark (Blue Hint) theme



[Image: KntYOUq.jpg]

First things first! If, for whatever reason, the theme crashes Gimp, just rename the gtkrc file in the theme's folder (say, rename it to gtkrc-off) and re-launch Gimp. It will open with the default theme, and you can switch to another theme (Edit -> Preferences | Theme).

The included Readme file talks about 20 theme variants in total, but I haven't done those yet. Well the hint-color variants are dead easy to make. Just make copies of the desired theme folder and edit the Current Highlight Color line in the gtkrc file. It already contains 5 colors (commented out), but feel free to set any other you want.

If you have a 4K monitor, you should probably increase the font-size. Actually have a look at the "USAGE TIPS: EDITING THE gtkrc FILE" section in the Readme file, for a few more easy tweaks you can do in the gtkrc file.

The zip file also contains the Clearlooks GTK2 theme-engine for Windows, as a separate zip-file (both x64 and x86). One only needs to copy the appropriate libclearlooks.dll file into: C:\Program Files\GIMP 2\lib\gtk-2.0\2.10.0\engines\ (or C:\Program Files (x86) \GIMP 2\lib\gtk-2.0\2.10.0\engines\ for 32-bit Windows)

If you are on Linux, without GTK2 installed, you can first install GTK2 and then install the gtk2-engines-clearlooks package, or the gtk2-engines package (whichever is available for your distro). The latter contains more GTK2 engines too, besides Clearlooks.

If you do NOT want to install GTK2 on your system, and prefer to use Gimp's GTK2 runtime instead, you can try to download any of the above mentioned packages (make sure they are for your specific Linux distro, unpack it to a temp folder, and look for the libclearlooks.so file. Then copy it into:  [whichever dir GIMP is installed in]/lib/gtk-2.0/2.10.0/engines/

Try here:  https://pkgs.org/download/gtk2-engines

If you are on macOS / Mac OS X I really have no idea what you can do. In the Readme file of the themes I have included a couple of links I found, but I seriously doubt they can be of any help, cause they look really old.

If you try the themes, please post here your feedback. I am only using Windows for a few years now, so I would really appreciate feedback for other OSes.

just install, working good, looking good. Thank you! I "hacked" gtkrc file from your Clearlooks Dark (Blue Hints) RC1.1 theme, i adjusted [gtk-font-name = "Sans 7"]; [font_name = "Sans 8"]; [GimpDock::font-scale = 1]; [GimpRuler::font-scale = 0.8444]. Is there any way to unbold the text under Tool Options dockable dialog (ex. Feather edges text, Rounded corners text under Rectangle Select appears to be bolded, see image for a better exemplification)? Smile


Attached Files Image(s)
   
Reply
#14
Hello fireflyyyyyy, thank you for the feedback!

I'm glad you adjusted it to your needs, that's the point. I have put lots of comments in the gtkrc, hoping it will be a little easier for users to customize them. Btw, did you test on Windows or Linux?

For the boldness of those check-buttons, it is not my doing (not purposely anyway).

I did a quick test, removing temporarily all the widget bindings from my gtkrc file, and the boldness remained. Then I did another quick test, temporarily renaming the gtkrc file, so that Gimp starts with its default fallback theme. The boldness was still there.

I noticed that the ONLY check-boxes whose text appears bold, are those that reveal a slider once you get them enabled. This, along with the quick tests I mention above, makes me think this boldness may be hard-coded into Gimp's sources code. EDIT: Plus, as far as I know, we cannot stylize text as bold from the gtkrc file (unless we use images). I spoke too soon! The following will make EVERY text of the UI bold, so I'll search if font_name can take a "regular" or "normal" or a similar value, and I'll try to fix it for you.

Code:
style "test" {
    font_name = "Bold"
}
class "GtkLabel" style:highest "test"


But I will do so more testing & research, just in case.
Reply
#15
Hi again fireflyyyyyy,

sadly I don't seem to be able to fix text boldness specifically for those check-boxes.

If you do not mind loosing text boldness EVERYWHERE inside any GimpFrame widget, add the following line inside the default style:
Code:
style "default"
{
 ...
 GimpFrame::label-bold = 0
 ...
}

I found that the specific check-boxes you want to change, can be targeted with this binding: widget_class "*.<GimpFrame>*<GtkToggleButton>*<GtkLabel>"

However, making a style specifically for them and putting  GimpFrame::label-bold = 0 in it, does NOT work. Try for example:

Code:
style "test" {
  GimpFrame::label-bold = 0

  fg[ACTIVE] = "red"
}
widget_class "*.<GimpFrame>*<GtkToggleButton>*<GtkLabel>" style:highest "test"

and you will see that those specific check-boxes turn their text red when enabled (so, fg[ACTIVE] works), but their boldness does NOT go away (so, GimpFrame::label-bold = 0 does NOT work).

Btw, font_name = "regular" and font_name = "normal" do not seem to be able to negate already existed boldness.

I hope someone can come up with a solution to your request, so I can implement it. Tbh, personally I like the fact that text boldness differentiates check-boxes that reveal sliders when enabled, form the plain ones. Smile
Reply
#16
Hi folks, I'm attaching a new zip-file here, because the forum does not let me edit my previous post anymore. The previous zip contained version RC1.1 of just the Dark Blue themes (link: https://www.gimp-forum.net/Thread-Styliz...5#pid18755). It also shows a screenshot of the Dark Small theme.

The zip attached in this post contains version RC1.2 of both Dark Blue and Light Blue themes (each including a regular and a small version).


.zip   Clearlooks_Gimp_2.10.1x_Hinted_Themes_RC1.2.zip (Size: 251.42 KB / Downloads: 150)

I rewrote a few parts especially for the Light theme. Here is how the Light SMALL Blue theme looks, on Windows, with 24" monitor, set @Full HD resolution.

[Image: XP272sX.jpg]

The main difference between RC1.1 and RC1.2 is mostly housekeeping of the gtkrc file (more comments, some additional styles, bindings, etc). There are some minor visual changes too (for example, the tree expander arrows are now color-hinted, though they are not consistent between dialogs and lists).

The behavior of Dark and Light themes are slightly different. A few elements are highlighted a little differently (like the spin-buttons for example) because directly translating from the Dark theme wasn't emphasizing things the way I wanted. Also, since these Light themes are supposed to be used with the Symbolic-Inverted icons (which are black), the highlight color is lighter compared to the dark themes (the dark themes are supposed to be used with the Symbolic icons, which are white).

I think I'm done with these for now. There are a few inconsistencies, but all in all I'm quite happy with the themes. I'll probably revisit the themes for an update at a later time.

Feedback is always welcome, but most probably I'll release all the themes in the next couple of days, max. Until then, feel free  to post here any fixes/suggestions you may have (if they are biggies, I'll try to add them on time).
Reply
#17
All right guys, all 20 variations of the themes are ready. You can get them from my DeviantArt.

The check/radio marks in the Dark themes are now color-hinted too, just like they were in the Light themes since RC1. Also, tiny icons like the selection-modes are now more spacey. I don't remember what else I improved (LOL).

I'd like to thank everyone who participated in this topic!
Reply
#18
(06-21-2020, 10:17 PM)migf1 Wrote: All right guys, all 20 variations of the themes are ready. You can get them from my DeviantArt.

The check/radio marks in the Dark themes are now color-hinted too, just like they were in the Light themes since RC1.  Also, tiny icons like the selection-modes are now more spacey. I don't remember what else I improved (LOL).

I'd like to thank everyone who participated in this topic!

Hi @migf1,

This looked interesting and I thought I'd give it a try. I'm running Arch Linux BTW. 

Here are a couple of things I ran into.

Concerning GTK2 installation for Linux.
Quote:5. Copy the libclearlooks.so file into the following folder:
       (whichever dir Gimp is installed in)/lib/gtk-2.0/2.10.0/engines/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Finding the right package for your exact distro may prove challenging.
But if you make this work, it will save you a system-wide GTK2 installation,
because Gimp ships with its own GTK2 runtime.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The path you reference in line item 5. is not part of my installation. I wish I was up on the finer points of GTK2 on Linux to explain this, but here is the file list of what is installed on my system.

That aside, I went ahead and installed the gtk2-engines package. The theme looks very nice and "mostly" works, but I am not getting the tab highlights for either the image or the tool panel tabs.

   

I haven't read this entire thread and maybe this problem has been mentioned before, so I'll sift through and see if I can find out why. Regardless, I appreciate your work on this and consider this an improvement for usability over the stock theme.

Cheers!
Reply
#19
Hello @akovia,

thank you very much for the feedback!

The missing tabs-highlights is a sign that the Clearlooks them-engine is not used. From the screenshot I would say that the theme is rendered with the the pixmap theme-engine (which is the engine used by the default themes). On another forum I just had another linux user having the same problem, but on Ubuntu ( http://gimpchat.com/viewtopic.php?f=12&t...68#p252562 ). In his case, tabs are rendered white. On that forum, an MX Linux user reported that the themes runs fine ( http://gimpchat.com/viewtopic.php?f=12&t...68#p252558 ).

Please do NOT worry about the libclearlooks.so file, I mentioned above (and in the Readme.txt file). Apparently, the structure of Gimp's directory tree differs between Windows and Lunix (maybe even the code itself treats Windows and Linux differently, i don't know). So even if you manage to find that .so file (or compile it yourself from sources) I really do not know where you should copy it on Linux.

All in all, this is bad news. Mostly because I don't have access to any distro of Linux, in which case I would investigate myself. In theory, having the GTK2 runtime and the gtk2-engines package installed on teh system should be enough. I really do not know what is going on. Even more, why it works fine on MX Linux, and not on Ubuntu and Arch.
Reply
#20
@migf1

No worries. I did a little investigating and it makes a bit more sense now. The libclearlooks.so file is not under gimp, but under gtk2 where it should be in Linux.

/usr/lib/gtk-2.0/2.10.0/engines/libclearlooks.so

If I remove the gtk2-engines package, the theme mostly looks the same, but now that blue accent that borders the left side of the menus is gone, so something in the gtk2-engines package was being used by the theme. If I figure out anything relevant I'll be sure to post back.
Reply


Forum Jump: