D12804: Fix window frame rounding when scaling is used

2018-07-13 Thread David Edmundson
davidedmundson added a comment. > And in that function qreal newScale = screens()->scale(m_screen); gets the value from here: https://github.com/KDE/kwin/blob/master/screens.cpp#L114 > You can see that this function just returns 1 The method is virtual. It definitely is not always 1.

D12804: Fix window frame rounding when scaling is used

2018-07-13 Thread Alex Nemeth
anemeth added a comment. F6100511: breeze2x.PNG REPOSITORY R31 Breeze REVISION DETAIL https://phabricator.kde.org/D12804 To: anemeth, #breeze, #vdg, hpereiradacosta, davidedmundson Cc: zzag, davidedmundson, ngraham, plasma-devel, ragreen, Pitel, Zre

D12804: Fix window frame rounding when scaling is used

2018-07-13 Thread Alex Nemeth
anemeth added a comment. As others said the dpi scaling should normally be dealt with `QImage::setDevicePixelRatio()` As far as I can tell this is not working with Breeze for the following reason: The decoration rendering starts here: https://github.com/KDE/kwin/blob/master/decorations

D12804: Fix window frame rounding when scaling is used

2018-07-13 Thread Alex Nemeth
anemeth updated this revision to Diff 37718. anemeth added a comment. Rebase on master REPOSITORY R31 Breeze CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D12804?vs=33941&id=37718 BRANCH master REVISION DETAIL https://phabricator.kde.org/D12804 AFFECTED FILES kdecoration/

D12804: Fix window frame rounding when scaling is used

2018-05-14 Thread Alex Nemeth
anemeth added a comment. Here is Breeze close button modified to use `QPainter::drawRoundedRect()` and uses the same radius (3) as the titlebar: F5848210: aa.PNG This scales well, so I don't think it is a bug in Qt. REPOSITORY R31 Breeze REV

D12804: Fix window frame rounding when scaling is used

2018-05-14 Thread Alex Nemeth
anemeth added a comment. In D12804#262333 , @zzag wrote: > Also, what session it is? (X11 or Wayland) > > I think you're facing one of X11 issues. X11 On Wayland it scales right REPOSITORY R31 Breeze REVISION DETAIL https://pha

D12804: Fix window frame rounding when scaling is used

2018-05-14 Thread Vlad Zagorodniy
zzag added a comment. Also, is it X11 or Wayland session? REPOSITORY R31 Breeze REVISION DETAIL https://phabricator.kde.org/D12804 To: anemeth, #breeze, #vdg, hpereiradacosta, davidedmundson Cc: zzag, davidedmundson, ngraham, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohame

D12804: Fix window frame rounding when scaling is used

2018-05-14 Thread Vlad Zagorodniy
zzag added a comment. In D12804#262301 , @hpereiradacosta wrote: > Most likely the actual issue is in kdecoration2 ... I don't think so. Again, IIRC, decoration render does the following: - create backing store - sets device pixel

D12804: Fix window frame rounding when scaling is used

2018-05-14 Thread Hugo Pereira Da Costa
hpereiradacosta added a comment. In D12804#262291 , @davidedmundson wrote: > > IIRC, decoration renderer sets device pixel ratio, so in theory, you should not multiply frame radius by dpr. > > For some reason my comment went missing, but as

D12804: Fix window frame rounding when scaling is used

2018-05-14 Thread David Edmundson
davidedmundson added a comment. > IIRC, decoration renderer sets device pixel ratio, so in theory, you should not multiply frame radius by dpr. For some reason my comment went missing, but as zzag said, with high DPI here the only things we should ever change are pixmap sizes and QPixm

D12804: Fix window frame rounding when scaling is used

2018-05-10 Thread Vlad Zagorodniy
zzag added a comment. In D12804#260617 , @anemeth wrote: > In D12804#260610 , @hpereiradacosta wrote: > > > Also: how does it work with multiple monitors ? (I see you get the info from ::primaryScre

D12804: Fix window frame rounding when scaling is used

2018-05-10 Thread Alex Nemeth
anemeth added a comment. In D12804#260610 , @hpereiradacosta wrote: > Also: how does it work with multiple monitors ? (I see you get the info from ::primaryScreen, not for the screen the window is actually on ? As far as I know KWin does

D12804: Fix window frame rounding when scaling is used

2018-05-10 Thread Hugo Pereira Da Costa
hpereiradacosta added a subscriber: davidedmundson. hpereiradacosta added a comment. could you add @davidedmundson as a reviewer ? I think he knows a lot about how pixel scaling is/should be handled in kwin and plasma. (definitly more than myself). REPOSITORY R31 Breeze REVISION DETAIL

D12804: Fix window frame rounding when scaling is used

2018-05-10 Thread Hugo Pereira Da Costa
hpereiradacosta added a comment. Also: how does it work with multiple monitors ? (I see you get the info from ::primaryScreen, not for the screen the window is actually on ? REPOSITORY R31 Breeze REVISION DETAIL https://phabricator.kde.org/D12804 To: anemeth, #breeze, #vdg, hpereiradaco

D12804: Fix window frame rounding when scaling is used

2018-05-10 Thread Hugo Pereira Da Costa
hpereiradacosta added a comment. mmm. Ok. It works. Now, why is it not handled upstream (by kwin or Qt), as it is in the widget style ? (see how the QStyle rounding, for e.g. the inner frame of your list) is rounded properly when changing the scale factor. And then, should it not be fixe

D12804: Fix window frame rounding when scaling is used

2018-05-10 Thread Nathaniel Graham
ngraham added a comment. Beautiful! +1. REPOSITORY R31 Breeze REVISION DETAIL https://phabricator.kde.org/D12804 To: anemeth, #breeze, #vdg, hpereiradacosta Cc: ngraham, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart

D12804: Fix window frame rounding when scaling is used

2018-05-10 Thread Alex Nemeth
anemeth created this revision. Restricted Application added a project: Plasma. Restricted Application added a subscriber: plasma-devel. anemeth requested review of this revision. REPOSITORY R31 Breeze BRANCH titlebar-round-scaling (branched from master) REVISION DETAIL https://phabricator.