New color wheel should not increase the width of docked Fill&Stroke dialog when scaled

Bug #687655 reported by su_v
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Low
John Smith

Bug Description

Follow-up report to
Bug #170046 “Ugly Gtk triangle border in Color Wheel”:
<https://bugs.launchpad.net/inkscape/+bug/170046>

Refers to the changes committed in r9942,
tested with Inkscape 0.48+devel r9942 and r9943 on OS X 10.5.8

In current trunk (r9942), resizing the height of the docked dialog scales the color wheel and - if its diameter gets bigger - also increases the width of the docked dialog. OTOH it doesn't reduce the width if the color wheel shrinks due to reducing the dialog height, at least when docked.

Previously the width of the docked Fill&Stroke dialog was determined by the minimal size needed (for the color sliders and - AFAICT mainly - for the strings in the UI labels of the tabs and the names in the list of patterns/markers in the 'Stroke style' tab). The automagic scaling of the color wheel never caused the dialog to get wider, it just optimized the size of the wheel to make best use of the available area.

ISTM that ideally, the scaling of the new gtk color wheel needs to have an upper limit - fit into the current width of the dialog - when used as docked dialog (it seems to behave like that when used as floating dialog).

Steps to reproduce (tested with default prefs):

1) open new doc or one with many layers
2) make Inkscape full-screen (F11)
3) open the layers dialog (docked), maximize it vertically
   (use the max. available height to avoid the scrollbar in the docked layers dialog)
4) iconify the layers dialog
5) draw a rect and open the fill & stroke dialog

Expected result (like in 0.48.0):
Width of the docked Fill&Stroke dialog is as minimal as possible, size of the color wheel is maximized within that minimal width.

Actual result:
Width of the Fill&Stroke grows (depending on the used theme and font size for the UI, by a considerable amount - up to a third of the screen width in my tests) and unnecessarily reduces the size of the visible canvas area.
Resizing the fill&stroke dialog each time is not an option because reducing the height by dragging the bottom resize grip with the mouse is far too slow to be usable (as explained by JonCruz: "It is because the wheel is forcing a minimum size, so when you drag to that current limit it has to go through a cycle of event pushing and widget recalc from our manual updates").

Screenshots on Mac OS X 10.5.8:
Inkscape 0.48.0:
<http://imgh.us/docked-colorwheel-0.48.0-fullscreen-osx.png>
Inkscape 0.48+devel r9942:
<http://imgh.us/docked-colorwheel-r9942-fullscreen-osx.png>

Changed in inkscape:
assignee: nobody → Jon A. Cruz (jon-joncruz)
Revision history for this message
su_v (suv-lp) wrote : Re: [Bug 687655] New color wheel should not increase the width of docked Fill&Stroke dialog when scaled

Attaching the screenshots instead of linking to externally hosted files.

jazzynico (jazzynico)
Changed in inkscape:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
su_v (suv-lp) wrote :

Related:
Bug #786892 “Gradient editor panel dialog is not resizing properly”
<quote>
Resizing the gradient editor panel dialog is not behaving as expected. The dialog box redrawing is heavily lagging behind the mouse dragging.
</quote>
<https://bugs.launchpad.net/inkscape/+bug/786892>

Revision history for this message
su_v (suv-lp) wrote :

New fill&stroke mode for custom swatches triggers this too (due to increased minimal height of the dialog) if object with a mix of flat color (e.g. stroke) and swatch color (e.g. fill) is selected:

Steps to reproduce:
1) mv ~/.config/inkscape{,-bkp}, launch inkscape
2) draw a circle (red fill, black stroke)
3) draw a rectangle (blue fill, black stroke)
4) open Fill&Stroke, select rectangle and convert fill to swatch
5) increase document window height to show full height of current fill&stroke dialog

-> minimal width of fill&stroke increases when document window is large enough to display the dialog in swatch color mode without scroll bar for the dock.
Cause: the larger diameter of the color wheel drawn in the 'Stroke Paint' tab for the currently selected object.

6) select the circle (no swatch color used)

-> minimal width of the dialog returns to expected smaller size.

Revision history for this message
su_v (suv-lp) wrote :

> New fill&stroke mode for custom swatches triggers this
> too (due to increased minimal height of the dialog)

On Ubuntu 12.04 this effect seems less noticeable with Ubuntu's overlay scrollbars (at least if running in VirtualBox). Please test by launching inkscape with
$ LIBOVERLAY_SCROLLBAR=0 inkscape

Revision history for this message
John Smith (john-smithi) wrote :

Simple patch that stops the dialog expanding in width when re-sizing the height.
Unfortunately the wheel is a few px smaller ...
Tested on Ubuntu (with scollbars) and Windows 7.

Revision history for this message
su_v (suv-lp) wrote :

> Simple patch that stops the dialog expanding in width when re-sizing the height.

Patch tests ok on OS X 10.7.4 (tested with both backends of GTK+ 2.24.13).

Revision history for this message
John Smith (john-smithi) wrote :

Committed as r11729.

Changed in inkscape:
assignee: Jon A. Cruz (jon-joncruz) → John Smith (john-smithi)
status: Triaged → Fix Committed
Revision history for this message
su_v (suv-lp) wrote :

Changing bug status to 'Fix Released' in accordance with
<http://wiki.inkscape.org/wiki/index.php/Bug_management#Bug_status>:
reported issue only occurred in development snapshot builds and never in a released version.

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.