Small window size preference doesn't work

Bug #1659256 reported by jazzynico
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Low
Patrick Storz

Bug Description

Reproduced on Xubuntu 16.04, lp:inkscape rev. 15443.
Not reproduced with 0.91 and lp:inkscape/0.92.x rev. 15344.

When setting the window size (Edit>Preferences>Interface>Windows) to "Small", Inkscape still opens as if it were set to "Large".

Revision history for this message
Alvin Penner (apenner) wrote :

confirmed on Windows 10, Inkscape 0.92+devel 15423.

in trunk:
setting the window size to large leads to the preferences values:
     id="desktop"
       width="1200"
       height="675"

setting the window size to small leads to the preferences values:
     id="desktop"
       width="1274"
       height="873"

so the "small" window is slightly larger than the "large" window

Changed in inkscape:
status: New → Confirmed
su_v (suv-lp)
tags: added: gtk3
Revision history for this message
jazzynico (jazzynico) wrote :

Patch attached.

Changed in inkscape:
assignee: nobody → jazzynico (jazzynico)
status: Confirmed → In Progress
Revision history for this message
jazzynico (jazzynico) wrote :
Revision history for this message
Patrick Storz (ede123) wrote :

@jazzynico:
Is this issue actually still present in revisions >= r15507 [1] (which fixed all issues for me on Windows 10 x64)?
Changing the code in this way might cause regressions as it bypasses the check at [2] (effectively rendering that conditional useless as w/h will always be > 0).

However setting w = h = 1 should in principle (it's also equivalent to setting w = h = 0), see [3], but we should check if we have to remove the conditional.

Also we should check if there is an underlying issue we'd only be working around here, as I assumed the initial Window width would be the Windows natural width (which should be what we're ending up with when setting w = h = 1).

[1] http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/15507
[2] http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/view/head:/src/sp-namedview.cpp#L821
[3] https://developer.gnome.org/gtk3/stable/GtkWindow.html#gtk-window-set-default-size

Revision history for this message
Alvin Penner (apenner) wrote :

still seems to be an issue in current trunk.
In trunk, the small size is larger than the large size
Windows 10, Inkscape 0.92+devel 15592

small
  <group
     id="desktop"
    <group
       width="1469"
       height="873"

large
       width="1200"
       height="675"

In 92.1 the small size is smaller.
Windows 10, Inkscape 0.92.1 r15371

small
       width="468"
       height="419"

large
       width="1200"
       height="675"

In all cases I checked the box that says "don't save windows geometry"

Revision history for this message
jazzynico (jazzynico) wrote :

@Eduard - Yes it's still present with the latest trunk revisions.

As for the check, I'm not sure we really need it indeed. If we remove it, we can keep w = h = 0 for the minimal size option.
For the record, it was added rev.2059 (http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/2059). The previous revisions tested with -1.

Revision history for this message
Patrick Storz (ede123) wrote :

OK, just tested with r15598 on Windows 10 and in fact behavior between gtk2 and gtk3 changed when not setting the windows size explicitly:
- gtk2 starts with the smallest possible window size (the window can't be reduced in size any further)
- gtk3 start with the "natural" window size (i.e. it tries to adjust the size of the window to make all UI elements fit in.

My suggestion would be to keep the current behavior an rename it to "Default" (or "Optimal" or similar) and add a new option for "Small" that sets w = h = 0/1 and therefore forces the smallest possible window size.

In most cases the natural window size is probably what works best for most users, so we should not remove that as an option.

Has anybody tested how the current "Small" window size looks on very small screens (i.e. does it shrink to fit on the monitor)?

Revision history for this message
Patrick Storz (ede123) wrote :

> Has anybody tested how the current "Small" window size looks on very small screens (i.e. does it shrink to fit on the monitor)?

It seems that it does *not* shrink. I'd therefore revise my suggestions slightly and make the new "Small" option (the one with w = h = 1/0) the default and add an option "Optimal" that uses the natural window size (i.e. works like the current "Small" option.

Revision history for this message
Patrick Storz (ede123) wrote :

An alternative would be to use the native window size by default, but limit it to the screen size.

What do others think? What would be the most desirable default behavior?

Revision history for this message
Patrick Storz (ede123) wrote :

I implemented what I described in #9 now, see
https://gitlab.com/inkscape/inkscape/merge_requests/180

I also fixed the "small" window size options but chose to set it to an initial 600x600 now, as I think everything smaller is not really usable anyway (at least with common gtk3 themes) - we can obviously discuss this further if somebody thinks an even smaller window would be useful.

Patrick Storz (ede123)
Changed in inkscape:
status: In Progress → Fix Committed
assignee: jazzynico (jazzynico) → Eduard Braun (eduard-braun2)
Max Gaukler (mgmax)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.