try to enforce borders settings from KWin
AcceptedPublic

Authored by mart on Mon, Nov 4, 6:35 PM.

Details

Reviewers
davidedmundson
Group Reviewers
Plasma
KWin
Summary

this makes the "no borders" option do something: however it cause many
other issues with many themes that weren't really designed for "no
borders"
it fixes the "tiny borders" for almost all themes, as the whole calculation before
was
completely wrong

Test Plan

Some themes work way better now, some look broken with no border or no side borders
some look perfect with those options
another issue is that aurorae is going to support no borders, it has to support like
breeze resizing from the shadows

Diff Detail

Repository
R108 KWin
Branch
mart/auroraeBordersRefactor
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 18718
Build 18736: arc lint + arc unit
mart created this revision.Mon, Nov 4, 6:35 PM
Restricted Application added a project: KWin. · View Herald TranscriptMon, Nov 4, 6:35 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
mart requested review of this revision.Mon, Nov 4, 6:35 PM
ngraham added a subscriber: ngraham.EditedMon, Nov 4, 6:41 PM

Hmm, is there a way to just fix the calculation bug with Tiny borders without exchanging one broken case for another?

Also, I find myself wondering why we even need a Tiny borders setting:

  • People who want borders will pick a theme and use its default value (generally "Normal) or override the setting to be Normal.
  • People who don't like borders will what with the default Breeze theme or override the setting in whatever theme then end up choosing to be No Borders.
  • People who have accessibility concerns will make them larger than Normal.

But what's the user story/use case for the person who forces the borders to be Tiny?

davidedmundson added inline comments.
plugins/kdecorations/aurorae/src/lib/auroraetheme.cpp
224–225

can you explain where these numbers come from?

mart added inline comments.Tue, Nov 5, 8:59 AM
plugins/kdecorations/aurorae/src/lib/auroraetheme.cpp
224–225

they're as arbitrary as before, tough they are a range now, so:

  • take the border size from the theme
  • then bound with a min and max that depends from kwin settings that are yeah... completely arbitrary, as they were before

another issue is that aurorae is going to support no borders, it has to support like

breeze resizing from the shadows

Relevant kwin term is "resizeOnlyBorders" which come from the decoration.

Relevant breeze code: breezedecoration.cpp:420-435
Can probably just be lifted verbatim

I've been trying to run this patch, for me it appears the same. Plastik still has a 1px dark edge with no border set.

mart updated this revision to Diff 69576.Mon, Nov 11, 10:07 AM
  • support resize when no borders
mart added a comment.Mon, Nov 11, 10:09 AM

I've been trying to run this patch, for me it appears the same. Plastik still has a 1px dark edge with no border set.

yeah, some decorations still have something, some don't.
this depends on their metrics settings in their own config file, is again themes not done properly

plugins/kdecorations/aurorae/src/aurorae.cpp
391–392

Do we need to also do your new code here?

mart updated this revision to Diff 69640.Tue, Nov 12, 3:25 PM
  • properly setup extended borders also when svg changes
davidedmundson accepted this revision.Tue, Nov 12, 3:26 PM
This revision is now accepted and ready to land.Tue, Nov 12, 3:26 PM