Discussion:
[Gerbv-devel] RFC: fix default screen size on multiple monitor settings - test GTK3 missing.
Clemens Koller
2017-02-13 20:25:28 UTC
Permalink
Hello!

I was always wondering why gerbv starts by default with a good width (1500pix) but very limited height (450pix) window on my dual-monitor desktop (2x 2048 x 1152, horizontally aligned).

After some digging, I found that some multi monitor detection code does some odd math, messing up if nmonitors >1 aligned horizontally, touching the height as well.
Attached patch might fix that for the assumption that monitors are usually placed next to each other and not stacked on top of each other.
This is off course just an improvisational fix.

It seems that the GTK3 code would be a better solution, but I couldn't verify that code yet. Is there an configure option to build against GTK 3+?

Please comment if the patch is basically ok and how to test gerbv against GTK3.


Regards,

Clemens
Sergey Alyoshin
2017-02-14 05:32:42 UTC
Permalink
Post by Clemens Koller
Hello!
I was always wondering why gerbv starts by default with a good width (1500pix) but very limited height (450pix) window on my dual-monitor desktop (2x 2048 x 1152, horizontally aligned).
After some digging, I found that some multi monitor detection code does some odd math, messing up if nmonitors >1 aligned horizontally, touching the height as well.
Attached patch might fix that for the assumption that monitors are usually placed next to each other and not stacked on top of each other.
This is off course just an improvisational fix.
Maybe we should just save/restore (via GtkSettings?) last used gerbv
window screen position and size?
Post by Clemens Koller
It seems that the GTK3 code would be a better solution, but I couldn't verify that code yet. Is there an configure option to build against GTK 3+?
Please comment if the patch is basically ok and how to test gerbv against GTK3.
GTK3 support require some patching (it was done couple of years ago by
someone and I think I do have those patches), and as GTK3 is not yet
in gschem nor in pcb, and than was no stable GTK3 port for Win, so
gerbv is on GTK2.
Clemens Koller
2017-02-15 19:06:07 UTC
Permalink
Hello, Sergey!
Post by Sergey Alyoshin
Post by Clemens Koller
I was always wondering why gerbv starts by default with a good width (1500pix) but very limited height (450pix) window on my dual-monitor desktop (2x 2048 x 1152, horizontally aligned).
After some digging, I found that some multi monitor detection code does some odd math, messing up if nmonitors >1 aligned horizontally, touching the height as well.
Attached patch might fix that for the assumption that monitors are usually placed next to each other and not stacked on top of each other.
This is off course just an improvisational fix.
Maybe we should just save/restore (via GtkSettings?) last used gerbv
window screen position and size?
My GTK knowledge is very limited. I am not sure if GtkSettings is useful here to save/restore settings.
https://people.gnome.org/~ryanl/gtk/html/GtkSettings.html

However having settings stored in ~/.config/gerbv/gerbv.conf definitely makes sense and the capability to choose config files -c, --config <filename> would increase productivity to work with different projects, IMO.

I.e. the configure switch and the new command line switch -u, --units would not be necessary anymore.

Regards,

Clemens
--
Sergey Alyoshin
2017-02-16 05:47:05 UTC
Permalink
Post by Clemens Koller
Hello, Sergey!
Post by Sergey Alyoshin
Post by Clemens Koller
I was always wondering why gerbv starts by default with a good width (1500pix) but very limited height (450pix) window on my dual-monitor desktop (2x 2048 x 1152, horizontally aligned).
After some digging, I found that some multi monitor detection code does some odd math, messing up if nmonitors >1 aligned horizontally, touching the height as well.
Attached patch might fix that for the assumption that monitors are usually placed next to each other and not stacked on top of each other.
This is off course just an improvisational fix.
Maybe we should just save/restore (via GtkSettings?) last used gerbv
window screen position and size?
My GTK knowledge is very limited. I am not sure if GtkSettings is useful here to save/restore settings.
https://people.gnome.org/~ryanl/gtk/html/GtkSettings.html
Sorry, it is GSettings
https://developer.gnome.org/gio/unstable/settings.html
Post by Clemens Koller
However having settings stored in ~/.config/gerbv/gerbv.conf definitely makes sense and the capability to choose config files -c, --config <filename> would increase productivity to work with different projects, IMO.
I.e. the configure switch and the new command line switch -u, --units would not be necessary anymore.
Should we really add one more configuration file? We can add units
field in project file, and we can support loading multiply project
files to override some settings.
Sergey Alyoshin
2017-02-16 05:49:46 UTC
Permalink
Post by Sergey Alyoshin
Sorry, it is GSettings
https://developer.gnome.org/gio/unstable/settings.html
Looks like it is it:

gsettings list-recursively org.gnome.gthumb

org.gnome.gthumb.browser browser-sidebar-width 285
org.gnome.gthumb.browser window-height 0
org.gnome.gthumb.browser window-width 0

Loading...