Re: borderless MacOS menus (was 'Gtk3 MacOS (OSX) context menu issues')
- From: Jim Charlton <charltn gmail com>
- To: Roger Davis <rbd soest hawaii edu>, gtk-app-devel-list gnome org
- Subject: Re: borderless MacOS menus (was 'Gtk3 MacOS (OSX) context menu issues')
- Date: Sun, 15 Mar 2015 11:02:58 -0700
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 <charltn gmail com>
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]