Bug 363482 - Toolview vsizing can lead to widget clipping in the Search & Replace view
Summary: Toolview vsizing can lead to widget clipping in the Search & Replace view
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: search (show other bugs)
Version: unspecified
Platform: Compiled Sources All
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-24 20:41 UTC by RJVB
Modified: 2016-05-25 09:25 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Clipped widgets on OS X with the native Macintosh QPA and widget style (31.97 KB, image/png)
2016-05-24 20:42 UTC, RJVB
Details
Widget clipping under X11 with the Breeze style (35.42 KB, image/png)
2016-05-24 20:44 UTC, RJVB
Details
result of the fix, native Mac theme (49.71 KB, image/png)
2016-05-25 09:25 UTC, RJVB
Details

Note You need to log in before you can comment on or make changes to this bug.
Description RJVB 2016-05-24 20:41:23 UTC
The toolview area under the edit view and statusbar can be sized vertically which is useful for certain toolviews. Not all tools are equally robust however; the Search & Replace toolview doesn't set a minimal vertical size that allows all widgets to be drawn at their normal size. See the attached screenshots.


Reproducible: Always

Steps to Reproduce:
1. Open Kate5
2. Activate the Search & Replace view, in the advanced mode ("Search in", Filter:, Exclude:)
3. Downsize the toolview area to its minimal height

Actual Results:  
See the screenshots. The widgets in the advanced view get clipped.

Expected Results:  
The minimal height should be dictated by the visible widgets
Comment 1 RJVB 2016-05-24 20:42:16 UTC
Created attachment 99162 [details]
Clipped widgets on OS X with the native Macintosh QPA and widget style
Comment 2 RJVB 2016-05-24 20:44:49 UTC
Created attachment 99163 [details]
Widget clipping under X11 with the Breeze style

I first thought this glitch was related to the sizing/misalignment issues that occur with the Mac native theme, but clearly that's not the case.
Comment 3 Kåre Särs 2016-05-25 07:33:05 UTC
Fixed in master:
Git commit 33c2769ec49c019e088c9c4f3a1e819b574ed823 by
Comment 4 RJVB 2016-05-25 08:48:05 UTC
Thanks for a quick (and apparently easy) fix.

I haven't yet had time to rebuild; does the calculated container minimum height take into account the minimum height of the "advanced" view regardless of whether it's visible? Not that it's a problem if the toolview area is resized when you toggle its mode...
Comment 5 Kåre Särs 2016-05-25 09:11:35 UTC
I just set the minimum size of the sizeHint of the widget with advanced open. So no resizing, but I wonder if it now forces it to be too high... Let's try this and if it turns out it is too high we can do something else ;)
Comment 6 RJVB 2016-05-25 09:25:46 UTC
Created attachment 99165 [details]
result of the fix, native Mac theme

No, the fix seems to work as intended. The view isn't too high, at least not any more so than is usual for the Mac native theme (which wastes a lot of space IMHO).

The only thing you might consider is a state variable that keeps track of whether a toolview was shown at its minimal height. That would make it possible to resize it if ever it becomes too high because the minimal height decreased, for instance after changing to a more compact theme or after reducing font sizes.