Sign up

GTK3.20 win issues (gtkd distribution)

playing with the new 3.20 GTK packages (win32) from the GtkD website i
ran into 2 issues.

1) the theme is very different from 3.18 and does not fit in at all - it
rather looks like a Mac theme. it has very rounded corners and there is
no app icon in the upper left corner of the window. maybe this package
is lacking the windows theme altogether? maybe a small config entry/file
is missing?

2) as the GTK developers made the inexplicable decision to give Notebook
widgets (and their tabs) a hard-coded white background, instead of the
typical transparent/fall-through-to-system color, i am using following
fix for my programs:

enum myCSS = q{
     GtkNotebook {
         background-color: #e9e9e9;
     }
     GtkNotebook tab {
         background-color: #d6d6d6;
     }
};
...
int main(string[] args){
...
     import gtk.CssProvider;
     auto styleProvider = new CssProvider;
     styleProvider.loadFromData(myCSS);
     import gdk.Screen;
     import gtk.StyleContext;
     StyleContext.addProviderForScreen( Screen.getDefault(), 
styleProvider, 800);

(i then use the Builder to load my GUI from glade files.)

unfortunately, this fix does not work anymore with the 3.20 package, the
background stays white!

also, not sure how serious this is, i get a new warning that i have not
seen before:

GLib-GObject-WARNING **: attempt to override closure->va_marshal
(63c488b0) with new marshal (66925ea8)

thanks
/det

Re: GTK3.20 win issues (gtkd distribution)

On 06/28/2016 05:15 AM, captaindet wrote:

playing with the new 3.20 GTK packages (win32) from the GtkD website i
ran into 2 issues.

1) the theme is very different from 3.18 and does not fit in at all - it
rather looks like a Mac theme. it has very rounded corners and there is
no app icon in the upper left corner of the window. maybe this package
is lacking the windows theme altogether? maybe a small config entry/file
is missing?

It currently uses the default theme "adwaita", there is an win32 theme
that comes with the installer, but that also looks out of place at least
on windows 10.

2) as the GTK developers made the inexplicable decision to give Notebook
widgets (and their tabs) a hard-coded white background, instead of the
typical transparent/fall-through-to-system color, i am using following
fix for my programs:

enum myCSS = q{
    GtkNotebook {
        background-color: #e9e9e9;
    }
    GtkNotebook tab {
        background-color: #d6d6d6;
    }
};
...
int main(string[] args){
...
    import gtk.CssProvider;
    auto styleProvider = new CssProvider;
    styleProvider.loadFromData(myCSS);
    import gdk.Screen;
    import gtk.StyleContext;
    StyleContext.addProviderForScreen( Screen.getDefault(),
styleProvider, 800);

(i then use the Builder to load my GUI from glade files.)

unfortunately, this fix does not work anymore with the 3.20 package, the
background stays white!

The css may have changed in the new release. i couldn't find GtkNotebook
in the default css at least.

Try setting the "GTK_DEBUG" environment variable to "interactive", this
will open an extra window that will allow you change the css on the fly.

also, not sure how serious this is, i get a new warning that i have not
seen before:

GLib-GObject-WARNING **: attempt to override closure->va_marshal
(63c488b0) with new marshal (66925ea8)

thanks
/det

Seems to be a bug in the current GTK version.

Re: GTK3.20 win issues (gtkd distribution)

On 2016-07-01 08:34, Mike Wey wrote:

1) the theme is very different from 3.18 and does not fit in at all - it
rather looks like a Mac theme. it has very rounded corners and there is
no app icon in the upper left corner of the window. maybe this package
is lacking the windows theme altogether? maybe a small config entry/file
is missing?

It currently uses the default theme "adwaita", there is an win32 theme
that comes with the installer, but that also looks out of place at least
on windows 10.

sorry, i am completely ignorant about this. how do i change the default
theme to the win32 theme or whatever it was in the 3.18 release?

if it looks again like in 3.18 i am good, i don't use w10 and never will.

thanks

/det

Re: GTK3.20 win issues (gtkd distribution)

On 2016-07-01 08:34, Mike Wey wrote:

The css may have changed in the new release. i couldn't find GtkNotebook
in the default css at least.

Try setting the "GTK_DEBUG" environment variable to "interactive", this
will open an extra window that will allow you change the css on the fly.

unfortunately, this did not work. the interactive debugger did not open.
reading the docs on gnome.org i also tried ctrl-shift-i and ctrl-shift-d

  • to no avail.

Re: GTK3.20 win issues (gtkd distribution)

Try setting the "GTK_DEBUG" environment variable to "interactive",
this will open an extra window that will allow you change the css on
the fly.

i had a hunch that this might only work under administrator account.
correct. so i played with the interactive debugger...

It currently uses the default theme "adwaita", there is an win32 theme
that comes with the installer, but that also looks out of place at least
on windows 10.

switching back and forth between 3.18 and 3.20 i found out that i was
also using theme "adwaita" under 3.18. i kinda liked that design, sure
it is a bit different from standard windows but i thought it looked good.

apparently 3.20 comes with a reworked version of "adwaita" which is
unacceptable to me. i find the sharp bottom corners extremely ugly.
also, the whole design looks completely wrong on windows. (and there is
the problem of the missing app icon in the upper left corner)

i checked out the win32 theme but it is from the stone age and also not
acceptable.

so i need a different theme...

can this be added to the GTK library as is and how? or can i only do
this via MSYS2? is there a way to get the adwaita3.18 theme running on
3.20? or am i stuck with the themes as is?

and again the question, how can i make a new/different theme the default
for all GTK apps?

The css may have changed in the new release. i couldn't find GtkNotebook
in the default css at least.

unfortunately, i could not identify the source of the background color
problem using the interactive debugger. using GTK3.18 i see the
GtkNotebook "background-color" set to my gray value as intended, using
GTK3.20 the GtkNotebook "background-color" value is set to black, even
though it is displayed as white and i asked it to be gray...

also there is still the problem of the app icon missing.

thanks
/det

Re: GTK3.20 win issues (gtkd distribution)

 GtkNotebook {
     background-color: #e9e9e9;
 }

just for future reference: seems like css node GtkNotebook has been
deprecated/removed (i think starting with 3.19.7). 'notebook' is the
replacement, but for whatever reason its background-color does not
propagate down... to change the main child area from a white background
to e.g. a gray one, this works:

notebook stack {

 background-color: #ededed;

}

/det