Re: borderless MacOS menus (was 'Gtk3 MacOS (OSX) context menu issues')
On Mon, 16 Mar 2016, Jim Charlton wrote: .menubar { border-width: 6px; background-color: red; border-color: black; border-style: solid; } Thanks Jim, that tip led to this good-enough-for-now solution: GtkMenu { border-width: 1px; border-color: #cc; border-style: solid; box-shadow: inset -1px -1px 2px #77; } GtkMenu is equivalent to .menu as far as I can tell, and both worked for me -- can anyone comment? The .menubar style class does not work as these are popup menus, not menubars. (Curiously, .popup does not work, which would seem to apply according to the GtkStyleContext man page.) My earlier attempt with * { did not work because I wasn't specifying the correct property entries. (border-width and border-style are key, I was incorrectly using margin before.) Box shadows seem totally unattainable on my MacOS system if I do not use the optional (!?!) 'inset' specifier. I actually do not want an inset shadow (I want outset?) but the above specification creates a shadow that's subtle enough that you can't easily tell the difference. Many minor gtk3 style inconsistencies remain between my MacOS and CentOS 7 boxes, but I think for now I've whacked all that exceed my personal hideousity threshold. Thanks! Roger ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: borderless MacOS menus (was 'Gtk3 MacOS (OSX) context menu issues')
On 15-03-15 08:24 PM, Jim Charlton wrote: On 15-03-15 01:49 PM, Roger Davis wrote: Thanks for the suggestion, Jim, but no luck so far in getting any change to my menu borders via .window-frame, .window-frame:backdrop { box-shadow: 6px 6px; margin: 6px; } which I added to a new $XDG_CONFIG_HOME/gtk-3.0/gtk.css file. This file is definitely being parsed at app startup time, because if I change .window-frame, .window-frame:backdrop { to instead read * { I get the most hideous GUI imaginable, i.e., big ugly shadow borders around almost everything *except* my menus, which are still completely borderless! It just seems like my system is flat-out never drawing any menu borders no matter what. Roger On Sun, 15 Mar 2015, Jim Charlton wrote: My experience has been that I can set the XDG_CONFIG_HOME environment variable to the path to the gtk-3.0 directory (eg. /opt/local/share/themes/Default) and then put both the gtk.css and the settings.ini file in the /opt/local/share/themes/Default/gtk-3.0/ directory. When a gtk3 application is run, both files will be processed. You can put css into the gtk.css file and it seems to override the in-line (compiled?) theme data. If you do figure out how to put shadowed margins on the menus, let us know if it brings back the item selection problem. If you just want to put a border on the menubar you can try adding .menubar { border-width: 6px; background-color: red; border-color: black; border-style: solid; } to the gtk.css file. This will give a red background and a wide, black border to the menubar. Or apply the same configuration to .menuitem to give background color and borders to all menu items in the menubar and in the dropdown menu boxes. I am not quite sure how you could make it shadowed. jim... Jim Charlton ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list Ahhh... you can get shadowed borders by adding something like .menubar { border-width: 1px; box-shadow: inset 0 0 10px #00;| border-style: solid; } You can experiment with various box-shadow parameters. jim... | ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: borderless MacOS menus (was 'Gtk3 MacOS (OSX) context menu issues')
On 15-03-15 01:49 PM, Roger Davis wrote: Thanks for the suggestion, Jim, but no luck so far in getting any change to my menu borders via .window-frame, .window-frame:backdrop { box-shadow: 6px 6px; margin: 6px; } which I added to a new $XDG_CONFIG_HOME/gtk-3.0/gtk.css file. This file is definitely being parsed at app startup time, because if I change .window-frame, .window-frame:backdrop { to instead read * { I get the most hideous GUI imaginable, i.e., big ugly shadow borders around almost everything *except* my menus, which are still completely borderless! It just seems like my system is flat-out never drawing any menu borders no matter what. Roger On Sun, 15 Mar 2015, Jim Charlton wrote: My experience has been that I can set the XDG_CONFIG_HOME environment variable to the path to the gtk-3.0 directory (eg. /opt/local/share/themes/Default) and then put both the gtk.css and the settings.ini file in the /opt/local/share/themes/Default/gtk-3.0/ directory. When a gtk3 application is run, both files will be processed. You can put css into the gtk.css file and it seems to override the in-line (compiled?) theme data. If you do figure out how to put shadowed margins on the menus, let us know if it brings back the item selection problem. If you just want to put a border on the menubar you can try adding .menubar { border-width: 6px; background-color: red; border-color: black; border-style: solid; } to the gtk.css file. This will give a red background and a wide, black border to the menubar. Or apply the same configuration to .menuitem to give background color and borders to all menu items in the menubar and in the dropdown menu boxes. I am not quite sure how you could make it shadowed. jim... Jim Charlton ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: borderless MacOS menus (was 'Gtk3 MacOS (OSX) context menu issues')
Thanks for the suggestion, Jim, but no luck so far in getting any change to my menu borders via .window-frame, .window-frame:backdrop { box-shadow: 6px 6px; margin: 6px; } which I added to a new $XDG_CONFIG_HOME/gtk-3.0/gtk.css file. This file is definitely being parsed at app startup time, because if I change .window-frame, .window-frame:backdrop { to instead read * { I get the most hideous GUI imaginable, i.e., big ugly shadow borders around almost everything *except* my menus, which are still completely borderless! It just seems like my system is flat-out never drawing any menu borders no matter what. Roger On Sun, 15 Mar 2015, Jim Charlton wrote: My experience has been that I can set the XDG_CONFIG_HOME environment variable to the path to the gtk-3.0 directory (eg. /opt/local/share/themes/Default) and then put both the gtk.css and the settings.ini file in the /opt/local/share/themes/Default/gtk-3.0/ directory. When a gtk3 application is run, both files will be processed. You can put css into the gtk.css file and it seems to override the in-line (compiled?) theme data. If you do figure out how to put shadowed margins on the menus, let us know if it brings back the item selection problem. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: borderless MacOS menus (was 'Gtk3 MacOS (OSX) context menu issues')
On 15-03-15 10:40 AM, Roger Davis wrote: Hi all, Thanks to Jim Charlton for the nice fix (or workaround) on the context menu problem! I've had a MacOS menu problem for some time which may be related to this, but as it's a bit off-topic re: the context menu thread I've started a new thread here. My MacOS gtk3 menus have no borders whatsoever, a rather annoying graphics glitch. This includes menus built-in to gtk3 widgets (e.g., made from gtk_combo_box_text_new()) as well as those made directly by me via gtk_menu_new(). The same menus look fine under CentOS. I'm using a perhaps unusual gtk3 setup under MacOS (although it does seem like many folks' MacOS gtk3 installs are unique). I am running the XQuartz backend with a very minimal gnome environment. I set XDG_CONFIG_HOME to reference my own private settings.ini file with the contents [Settings] gtk-application-prefer-dark-theme = false gtk-theme-name = Adwaita gtk-icon-theme-name = Adwaita gtk-font-name = Cantarell 12 This at least solved a recent font problem of mine (see the Feb. 2015 'gtk3 (GtkTextView) and MacOS' thread), so it seems to be doing something useful, and my shadowless menu issue pre-dates use of this file so it's not the source of the current problem. However, I'm not sure how to make any use of Jim's shadow-removing workaround to *add* shadows to my menus, since: (1) It seems that shadowed menus are supposed to be default bahavior, but I'm not getting shadows despite having done nothing to disable them. (2) My /opt/local/share/themes/Adwaita/gtk-3.0/gtk.css contains only the comment line /* Adwaita is the default theme of GTK+ 3, this file is not used */ implying there's nothing I can add there that will make the slightest bit of difference anyway. Of course, probably I should just be grateful that I don't suffer from the MacOS context menu sensitivity problem and leave well enough alone! Does anyone have any ideas? Thanks! Roger Davis Univ. of Hawaii From: Jim Charlton To: gtk-app-devel-list@gnome.org Subject: Re: Fwd: Gtk3 MacOS (OSX) context menu issues To answer part of my own question I am using my own gtk3 theme rather than the compiled Adwaita theme that comes with Gtk3. I set the environment variable XDG_CONFIG_HOME (export XDG_CONFIG_HOME=/opt/local/share/themes/Adwaita/gtk-3.0), edited /opt/local/share/themes/Adwaita/gtk-3.0/gtk.css to "@import url("gtk-main.css");" and then edit /opt/local/share/themes/Adwaita/gtk-3.0/gtk-main.css to customize the theme. (careful... your theme directory may be elsewhere, depending on how you installed Gtk3). To cure the context menu problem, I eliminated the margin on popup windows by adding |.window-frame, .window-frame:backdrop { box-shadow: none; margin: 0;} to the end of the gtk.css file. Without the margin box the selection problem seems to go away. This is not a cure... but perhaps a useful work-around! The inspiration for this idea comes from https://forum.xfce.org/viewtopic.php?pid=36005. HI Roger: My experience has been that I can set the XDG_CONFIG_HOME environment variable to the path to the gtk-3.0 directory (eg. /opt/local/share/themes/Default) and then put both the gtk.css and the settings.ini file in the /opt/local/share/themes/Default/gtk-3.0/ directory. When a gtk3 application is run, both files will be processed. You can put css into the gtk.css file and it seems to override the in-line (compiled?) theme data. If you do figure out how to put shadowed margins on the menus, let us know if it brings back the item selection problem. jim... Jim Charlton ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
borderless MacOS menus (was 'Gtk3 MacOS (OSX) context menu issues')
Hi all, Thanks to Jim Charlton for the nice fix (or workaround) on the context menu problem! I've had a MacOS menu problem for some time which may be related to this, but as it's a bit off-topic re: the context menu thread I've started a new thread here. My MacOS gtk3 menus have no borders whatsoever, a rather annoying graphics glitch. This includes menus built-in to gtk3 widgets (e.g., made from gtk_combo_box_text_new()) as well as those made directly by me via gtk_menu_new(). The same menus look fine under CentOS. I'm using a perhaps unusual gtk3 setup under MacOS (although it does seem like many folks' MacOS gtk3 installs are unique). I am running the XQuartz backend with a very minimal gnome environment. I set XDG_CONFIG_HOME to reference my own private settings.ini file with the contents [Settings] gtk-application-prefer-dark-theme = false gtk-theme-name = Adwaita gtk-icon-theme-name = Adwaita gtk-font-name = Cantarell 12 This at least solved a recent font problem of mine (see the Feb. 2015 'gtk3 (GtkTextView) and MacOS' thread), so it seems to be doing something useful, and my shadowless menu issue pre-dates use of this file so it's not the source of the current problem. However, I'm not sure how to make any use of Jim's shadow-removing workaround to *add* shadows to my menus, since: (1) It seems that shadowed menus are supposed to be default bahavior, but I'm not getting shadows despite having done nothing to disable them. (2) My /opt/local/share/themes/Adwaita/gtk-3.0/gtk.css contains only the comment line /* Adwaita is the default theme of GTK+ 3, this file is not used */ implying there's nothing I can add there that will make the slightest bit of difference anyway. Of course, probably I should just be grateful that I don't suffer from the MacOS context menu sensitivity problem and leave well enough alone! Does anyone have any ideas? Thanks! Roger Davis Univ. of Hawaii From: Jim Charlton To: gtk-app-devel-list@gnome.org Subject: Re: Fwd: Gtk3 MacOS (OSX) context menu issues To answer part of my own question I am using my own gtk3 theme rather than the compiled Adwaita theme that comes with Gtk3. I set the environment variable XDG_CONFIG_HOME (export XDG_CONFIG_HOME=/opt/local/share/themes/Adwaita/gtk-3.0), edited /opt/local/share/themes/Adwaita/gtk-3.0/gtk.css to "@import url("gtk-main.css");" and then edit /opt/local/share/themes/Adwaita/gtk-3.0/gtk-main.css to customize the theme. (careful... your theme directory may be elsewhere, depending on how you installed Gtk3). To cure the context menu problem, I eliminated the margin on popup windows by adding |.window-frame, .window-frame:backdrop { box-shadow: none; margin: 0;} to the end of the gtk.css file. Without the margin box the selection problem seems to go away. This is not a cure... but perhaps a useful work-around! The inspiration for this idea comes from https://forum.xfce.org/viewtopic.php?pid=36005. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list