Bug 342824 - Almost no padding for window icon in maximized window decoration
Summary: Almost no padding for window icon in maximized window decoration
Status: RESOLVED FIXED
Alias: None
Product: Breeze
Classification: Plasma
Component: window decoration (show other bugs)
Version: 5.1.95
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Hugo Pereira Da Costa
URL:
Keywords:
: 342954 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-01-14 08:26 UTC by Antonio Rojas
Modified: 2015-01-21 15:29 UTC (History)
3 users (show)

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


Attachments
Maximized window (5.50 KB, image/png)
2015-01-14 08:26 UTC, Antonio Rojas
Details
unmaximized window, for comparison (5.65 KB, image/png)
2015-01-14 08:27 UTC, Antonio Rojas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Antonio Rojas 2015-01-14 08:26:05 UTC
With the new breeze windeco in 5.2, window icons for maximized windows have only about 1 px padding at the top and on the left, which make them look like they're touching the creen border.

Reproducible: Always
Comment 1 Antonio Rojas 2015-01-14 08:26:32 UTC
Created attachment 90399 [details]
Maximized window
Comment 2 Antonio Rojas 2015-01-14 08:27:06 UTC
Created attachment 90400 [details]
unmaximized window, for comparison
Comment 3 David Edmundson 2015-01-15 15:13:48 UTC
Seems oxygen used to have an explicit shift in there:

from old oxygenbutton.cpp
        if( _client.isMaximized() ) painter.translate( 0, 1 );

which is a bit weird, it only moves the painting not the actual hit area
Comment 4 Hugo Pereira Da Costa 2015-01-19 09:03:41 UTC
*** Bug 342954 has been marked as a duplicate of this bug. ***
Comment 5 Hugo Pereira Da Costa 2015-01-19 09:05:10 UTC
Git commit 4dd75758dcb1b970c5e1c6638df0fa4f1aab542e by Hugo Pereira Da Costa.
Committed on 15/01/2015 at 10:07.
Pushed by hpereiradacosta into branch 'master'.

Moved buttons geometry handling to Breeze::decoration
Do not change size of titlebar when maximizing.
Expend buttons hit area to satisfy Fitts law in maximize mode
Related: bug 342864

M  +3    -12   kdecoration/breezebutton.cpp
M  +9    -0    kdecoration/breezebutton.h
M  +22   -15   kdecoration/breezedecoration.cpp
M  +8    -9    kdecoration/breezedecoration.h

http://commits.kde.org/breeze/4dd75758dcb1b970c5e1c6638df0fa4f1aab542e
Comment 6 Hugo Pereira Da Costa 2015-01-19 09:07:25 UTC
Note: padding on the top is now there.
There is no padding on the left still because adding such a thing +and+ honouring Fitts law, would require to break spacing, (or to go into some quite complex code in order to add the needed spacing to the first left button and last right button, and on the right side)
Comment 7 Hugo Pereira Da Costa 2015-01-19 09:52:45 UTC
Edit:
in the end I went for the extra mile and also implemented the horizontal padding, so that buttons should not move any more when maximizing, but hit area should be extended to satisfy Fitts law. 
Testing welcome (using master)
I will backport to 5.2 after a couple of days testing, myself, and as soon as it is unfrozen.
Comment 8 David Edmundson 2015-01-19 10:57:31 UTC
5.2 isn't frozen for bug fixes
Comment 9 Hugo Pereira Da Costa 2015-01-19 11:23:20 UTC
... yes but still I need couple of days testing because this stuff is breakage prone.
Comment 10 Hugo Pereira Da Costa 2015-01-19 11:28:24 UTC
(In reply to David Edmundson from comment #3)
> Seems oxygen used to have an explicit shift in there:
> 
> from old oxygenbutton.cpp
>         if( _client.isMaximized() ) painter.translate( 0, 1 );
> 
> which is a bit weird, it only moves the painting not the actual hit area

believe me it all makes sense (tm) :)
top padding is removed (Fitts law)
bottom padding is kept
painting is shifted to preserve vertical alignment.
Only issue: it requires larger buttons (to accomodate the shift)

For breeze I now chose a different solution: all padding is kept, hit area ( = buttons geometry) is increased (Fitts law), painting is shifted (to maintain alignment)
Comment 11 Hugo Pereira Da Costa 2015-01-21 15:29:03 UTC
Git commit ab80e3880f9a6928038147b339faafcf91279302 by Hugo Pereira Da Costa.
Committed on 15/01/2015 at 10:07.
Pushed by hpereiradacosta into branch 'Plasma/5.2'.

Moved buttons geometry handling to Breeze::decoration
Do not change size of titlebar when maximizing.
Expend buttons hit area to satisfy Fitts law in maximize mode
Related: bug 342864

M  +3    -12   kdecoration/breezebutton.cpp
M  +9    -0    kdecoration/breezebutton.h
M  +22   -15   kdecoration/breezedecoration.cpp
M  +8    -9    kdecoration/breezedecoration.h

http://commits.kde.org/breeze/ab80e3880f9a6928038147b339faafcf91279302