Re: Fwd: Gtk3 MacOS (OSX) context menu issues

2015-03-15 Thread Jim Charlton
With the default MacPorts installation of gtk3, one can set 
XDG_CONFIG_HOME to /opt/local/share/themes/Default and then include the 
gtk.css file with

.window-frame,
.window-frame:backdrop {
  box-shadow: none;
  margin: 0;}

in it, in /opt/local/share/themes/Default/gtk-3.0/gtk.css

and the margins will disappear on the popup menu boxes avoiding the 
selection problem.  No need to install an alternate theme.

Please excuse the errors in the previous posting.

jim...  Jim Charlton


On 15-03-14 10:02 PM, Jim Charlton wrote:
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.


jim...   Jim Charlton
|




On 15-03-14 09:11 PM, Jim Charlton wrote:

A further note on the context menu issues

If one runs gtk3-demo and right clicks in the open pane on the lower 
right a context menu opens.  If one carefully slides the cursor 
pointer into the list and down the list the Select All will not 
highlight.  If you slide the cursor out of the box, being sure to go 
outside of the margin around the box, and then renter the box, the 
item will highlight.  But if you then carefully place the pointer 
into the margin area of the box and back into the box, the item 
ceases to be sensitive.


Is this possibly related to a patch introduced in April of last year...

https://mail.gnome.org/archives/commits-list/2014-April/msg01392.html ??

Or is there a way to change the css margin of popups to see if that 
will cure the problem... ??  H...?


jim...  Jim Charlton




On 15-03-14 09:25 AM, Konstantin Dmitriev wrote:

Hello, Jim!

2015-03-14 21:50 GMT+06:00 Jim Charlton char...@gmail.com:

Hi Konstantin:

I wrote to the list earlier to say that I could reproduce the 
problem that
you have identified.  I am using MAC Yosemite 10.10 in a VirtualBox 
VM.


To investigate further, I created a new Yosemite VM and installed 
MacPorts,

Xcode, Xcode tools, and then ran port install gtk3 +quartz and port
install gtkmm3 +quartz.  After this, running the gtk3-demo program 
showed

the same problem that you encountered.

When I look at your YouTube video of the gtk3-demo program, I see 
that you

have a different theme than the default compiled Adwaita theme.  I was
wondering exactly how you installed the dark theme that you were 
using?

The dark theme is enabled if you set the GTK_THEME environment
variable in the following way:
GTK_THEME=Adwaita:dark

I have been using gtk3 and gtkmm3 to create software for a coffee 
roasting
company.  I note that in my software, I have exactly the same 
problem that

you have found.  I just never noticed it before! :-)

I am not an expert on the Gtk3 and Gtkmm3 libraries.  But maybe if 
we keep

working on it, a solution will appear.

Yes, I am not a gtk3 expert a well, but I hope that this issue will
get resolved. At least I hope to attract attention of GTK developers.
^__^


It would be good to verify that this
problem occurs on a real MAC and not just on a virtual machine.

I have one report from the user who have experienced the same issue on
the real (non-virtual) machine -
http://www.synfig.org/issues/thebuggenie/synfig/issues/810
But it's better to double-check, of course. I haven't got confirmation
from the bugreporter that the issue is the same...

Also, I can provide the dmg package with the compiled binary, so
anyone can test if the issue happens on the real Mac as well -
http://sourceforge.net/projects/synfig/files/releases/1.0-RC1/osx/synfigstudio-1.0-rc1.dmg/download 



BTW, is it OK to forward this message to gtk-app mailing list, maybe
it will be interesting to others?

Best Regards,
Konstantin


On 15-03-05 09:17 AM, Konstantin Dmitriev wrote:

2015-03-03 15:01 GMT+06:00 Vest . vest...@gmail.com:

Hello Konstantin,

I apologize that I probably cannot help you, but I am curious. Do 
you

have
this issue, if you run a simple demo, where GtkMenu is used?
Because it seems that when you move the mouse outside of the menu's
boundaries, something inside the widget is cleared and the menu
receives
mouse events again.

Kind regards,
Vest

Hello, Vest!

Thank you for responding!
I have tested the gtk3-demo and (surprise!) 

borderless MacOS menus (was 'Gtk3 MacOS (OSX) context menu issues')

2015-03-15 Thread Roger Davis


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 char...@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.



___
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')

2015-03-15 Thread Roger Davis


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


Fwd: Fwd: Gtk3 MacOS (OSX) context menu issues

2015-03-15 Thread Konstantin Dmitriev
Sorry, forgot to forward my previous message into mailing list. ^__^


-- Forwarded message --
From: Konstantin Dmitriev ksee.zelga...@gmail.com
Date: 2015-03-15 22:32 GMT+06:00
Subject: Re: Fwd: Gtk3 MacOS (OSX) context menu issues
To: Jim Charlton char...@gmail.com


Hello, Jim!

2015-03-15 21:25 GMT+06:00 Jim Charlton char...@gmail.com:
 With the default MacPorts installation of gtk3, one can set XDG_CONFIG_HOME
 to /opt/local/share/themes/Default and then include the gtk.css file with
 .window-frame,
 .window-frame:backdrop {
   box-shadow: none;
   margin: 0;}

 in it, in /opt/local/share/themes/Default/gtk-3.0/gtk.css

 and the margins will disappear on the popup menu boxes avoiding the
 selection problem.  No need to install an alternate theme.
 Please excuse the errors in the previous posting.

Thank you very much for providing the workaround! This solves the
problem for my situation, because I can provide modified theme with
the distributive of our software.

Just a wild guess:
It would be interesting to create a custom theme with the following css options:
.window-frame,
.window-frame:backdrop {
  box-shadow: 0 0 10px rgba(0,0,0,0.5)
  margin: 15;
}
...and test it in some other OS (Linux and Windows). Maybe the problem
of insensitive menu will appear there as well!

Best Regards,
K.
___
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')

2015-03-15 Thread Jim Charlton

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 char...@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
___
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')

2015-03-15 Thread Jim Charlton

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