Merge branch 'Plasma/5.19'

This commit is contained in:
Vlad Zahorodnii 2020-05-29 10:48:45 +03:00
commit ed02ece38d
6 changed files with 39 additions and 5 deletions

View file

@ -54,7 +54,7 @@ DecoratedClientImpl::DecoratedClientImpl(AbstractClient *client, KDecoration2::D
emit decoratedClient->activeChanged(client->isActive());
}
);
connect(client, &AbstractClient::frameGeometryChanged, this,
connect(client, &AbstractClient::geometryShapeChanged, this,
[decoratedClient, this]() {
if (m_client->clientSize() == m_clientSize) {
return;

View file

@ -1378,8 +1378,8 @@ void PresentWindowsEffect::calculateWindowTransformationsNatural(EffectWindowLis
scale = (area.height() - 20) / double(bounds.height());
// Make bounding rect fill the screen size for later steps
bounds = QRect(
bounds.x() - (area.width() - 20 - bounds.width() * scale) / 2 - 10 / scale,
bounds.y() - (area.height() - 20 - bounds.height() * scale) / 2 - 10 / scale,
(bounds.x() * scale - (area.width() - 20 - bounds.width() * scale) / 2 - 10) / scale,
(bounds.y() * scale - (area.height() - 20 - bounds.height() * scale) / 2 - 10) / scale,
area.width() / scale,
area.height() / scale
);

View file

@ -165,7 +165,7 @@ Loader {
Layout.preferredWidth: 50 // 50%
Layout.fillWidth: true
from: 0
to: 4098
to: 32767
value: (controlType == RuleItem.Size) ? ruleValue.width : ruleValue.x
}
QQC2.Label {
@ -178,7 +178,7 @@ Loader {
id: coordY
editable: true
from: 0
to: 4098
to: 32767
Layout.preferredWidth: 50 // 50%
Layout.fillWidth: true
value: (controlType == RuleItem.Size) ? ruleValue.height : ruleValue.y

View file

@ -4,3 +4,8 @@ install(PROGRAMS kwin-5.16-auto-bordersize.sh
DESTINATION ${KDE_INSTALL_KCONFUPDATEDIR})
install(PROGRAMS kwin-5.18-move-animspeed.py
DESTINATION ${KDE_INSTALL_KCONFUPDATEDIR})
install(FILES kwinrules.upd
DESTINATION ${KDE_INSTALL_KCONFUPDATEDIR})
install(PROGRAMS kwinrules-5.19-placement.pl
DESTINATION ${KDE_INSTALL_KCONFUPDATEDIR})

View file

@ -0,0 +1,22 @@
#! /usr/bin/perl
# Convert strings as in `Placement::policyToString()` from `placement.cpp`
# to correponding values of enum `Placement::Policy` defined in `placement.h`
use strict;
while (<>)
{
chomp;
s/placement=NoPlacement/placement=0/;
s/placement=Default/placement=1/;
s/placement=Random/placement=3/;
s/placement=Smart/placement=4/;
s/placement=Cascade/placement=5/;
s/placement=Centered/placement=6/;
s/placement=ZeroCornered/placement=7/;
s/placement=UnderMouse/placement=8/;
s/placement=OnMainWindow/placement=9/;
s/placement=Maximizing/placement=10/;
print "$_\n";
}

View file

@ -0,0 +1,7 @@
Version=5
# Replace `placement` string policy to its enum value equivalent
Id=replace-placement-string-to-enum
File=kwinrulesrc
Script=kwinrules-5.19-placement.pl,perl