Trying to style a widget using gtkrc is not working - Zim wiki on Windows 7

1

I am using Zim wiki on Windows 7 and would like to style the pageview background to be a tiled bitmap. To start with, I am trying to see if I can just change the text colors.

I know the gtkrc is being correctly loaded because if I change the theme name, it is reflected when I start the application.

However if I try to apply a style as mentioned on http://zim-wiki.org/manual/Help/Config_Files.html

the style does not get applied. Is there something basic I am missing out?

gtk-theme-name = "MS-Windows"

style "mycolors" 
{
    base: "#333333"
    text: "#444444"
}

widget "*.zim-pageview" style "mycolors"

saraf

Posted 2014-08-12T02:06:31.443

Reputation: 113

Answers

3

The syntax given by the Config_File manual does not work for me either.

However I have tried the following syntax and it works for

pixmap_path "/path-to-background-image-files"

style "mycolors" 
{
  base[NORMAL]   = "black"
  base[SELECTED] = "#6699cc"   # npp deep black
  text[NORMAL]   = "#c0c0c0"   # windows cmd default color
  bg_pixmap[NORMAL] = "nexus.png"
}

widget "*.zim-pageview" style "mycolors"
widget "*.zim-pageindex" style "mycolors"
class "GtkWidget" style "mycolors"

I have referenced this link: Silas S. Brown's .gtkrc file, and for bg_pixmap, I referenced this one: pixmap sample

pimgeek

Posted 2014-08-12T02:06:31.443

Reputation: 218

1I figured it out and am using base[NORMAL] = "#fffadf" text[NORMAL] = "#8b4513" - which gives walnut colored text on the cream background used by OneNote. However, I have been unable to find a way to change the background to a tiled pixmap. – saraf – 2014-09-12T07:49:26.137

Sorry I misunderstood your original purpose... I will update my answer if I figure out a way to make Zim have a tiled bitmap background. – pimgeek – 2014-09-17T07:51:54.340

I have updated my answer, and the key lines are pixmap_path,... bg_pixmap[..., and class "GtkWidget..., which just proves that tiled pixmap does work. – pimgeek – 2014-09-17T08:27:06.060

It is not working for me :( I tried keeping the image in the etc/gtk-2.0 folder and using bg_pixmap[NORMAL] = "paper.png", and that prevented from the entire style being applied, I then also tried with bg_pixmap[NORMAL] = "C:\Program Files (x86)\Zim Desktop Wiki\etc\gtk-2.0\paper.png" which did not work either. What could be going wrong? – saraf – 2014-09-17T23:55:28.283

Fixed that. It was a problem with a non-standard space character in the pixmap line. Now am getting the pixmap as the background of everything but the pageview and pageindex http://imgur.com/3LbQF0d. How do I get the pixmap as the background of the pageview?

– saraf – 2014-09-18T00:02:16.280

1The devil is in the detail: I just had to replace all the : with = :-P – DutchUncle – 2014-12-16T22:03:04.167