try to enforce borders settings from KWin
ClosedPublic

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

Details

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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mart created this revision.Nov 4 2019, 6:35 PM
Restricted Application added a project: KWin. · View Herald TranscriptNov 4 2019, 6:35 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
mart requested review of this revision.Nov 4 2019, 6:35 PM
ngraham added a subscriber: ngraham.EditedNov 4 2019, 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.Nov 5 2019, 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.Nov 11 2019, 10:07 AM
  • support resize when no borders
mart added a comment.Nov 11 2019, 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
350–351

Do we need to also do your new code here?

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