Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libkdecoration2 for openSUSE:Factory 
checked in at 2022-04-01 21:35:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libkdecoration2 (Old)
 and      /work/SRC/openSUSE:Factory/.libkdecoration2.new.1900 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libkdecoration2"

Fri Apr  1 21:35:09 2022 rev:125 rq:965908 version:5.24.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/libkdecoration2/libkdecoration2.changes  
2022-03-12 17:15:11.502285792 +0100
+++ 
/work/SRC/openSUSE:Factory/.libkdecoration2.new.1900/libkdecoration2.changes    
    2022-04-01 21:35:36.161828247 +0200
@@ -1,0 +2,10 @@
+Tue Mar 29 16:04:38 UTC 2022 - Fabian Vogt <fab...@ritter-vogt.de>
+
+- Update to 5.24.4
+  * New bugfix release
+  * For more details please see:
+  * https://kde.org/announcements/plasma/5/5.24.4
+- Changes since 5.24.3:
+  * Add RtL support (kde#432390)
+
+-------------------------------------------------------------------

Old:
----
  kdecoration-5.24.3.tar.xz
  kdecoration-5.24.3.tar.xz.sig

New:
----
  kdecoration-5.24.4.tar.xz
  kdecoration-5.24.4.tar.xz.sig

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libkdecoration2.spec ++++++
--- /var/tmp/diff_new_pack.6OpJaN/_old  2022-04-01 21:35:36.761821666 +0200
+++ /var/tmp/diff_new_pack.6OpJaN/_new  2022-04-01 21:35:36.765821623 +0200
@@ -22,7 +22,7 @@
 %define lname_private   libkdecorations2private%{private_sover}
 %bcond_without released
 Name:           libkdecoration2
-Version:        5.24.3
+Version:        5.24.4
 Release:        0
 Summary:        KDE's window decorations library
 License:        GPL-2.0-or-later

++++++ kdecoration-5.24.3.tar.xz -> kdecoration-5.24.4.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdecoration-5.24.3/CMakeLists.txt 
new/kdecoration-5.24.4/CMakeLists.txt
--- old/kdecoration-5.24.3/CMakeLists.txt       2022-03-08 12:15:55.000000000 
+0100
+++ new/kdecoration-5.24.4/CMakeLists.txt       2022-03-29 13:17:02.000000000 
+0200
@@ -1,7 +1,7 @@
 cmake_minimum_required(VERSION 3.16)
 
 project(decoration-api)
-set(PROJECT_VERSION "5.24.3")
+set(PROJECT_VERSION "5.24.4")
 
 set(QT_MIN_VERSION "5.15.0")
 set(KF5_MIN_VERSION "5.86")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdecoration-5.24.3/po/ca@valencia/kdecoration.po 
new/kdecoration-5.24.4/po/ca@valencia/kdecoration.po
--- old/kdecoration-5.24.3/po/ca@valencia/kdecoration.po        2022-03-08 
12:15:58.000000000 +0100
+++ new/kdecoration-5.24.4/po/ca@valencia/kdecoration.po        2022-03-29 
13:17:05.000000000 +0200
@@ -24,7 +24,7 @@
 #: decorationbutton.cpp:299
 #, kde-format
 msgid "More actions for this window"
-msgstr "M??s accions per a aquesta finestra"
+msgstr "M??s accions per a esta finestra"
 
 #: decorationbutton.cpp:301
 #, kde-format
@@ -79,12 +79,12 @@
 #: decorationbutton.cpp:325
 #, kde-format
 msgid "Don't keep below other windows"
-msgstr "No mantinguis per sota de les altres finestres"
+msgstr "No mantinguis per davall de les altres finestres"
 
 #: decorationbutton.cpp:327
 #, kde-format
 msgid "Keep below other windows"
-msgstr "Mant??n per sota de les altres finestres"
+msgstr "Mant??n per davall de les altres finestres"
 
 #: decorationbutton.cpp:330
 #, kde-format
@@ -94,4 +94,4 @@
 #: decorationbutton.cpp:332
 #, kde-format
 msgid "Keep above other windows"
-msgstr "Mant??n al damunt de les altres finestres"
\ No newline at end of file
+msgstr "Mant??n al damunt de les altres finestres"
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdecoration-5.24.3/po/zh_CN/kdecoration.po 
new/kdecoration-5.24.4/po/zh_CN/kdecoration.po
--- old/kdecoration-5.24.3/po/zh_CN/kdecoration.po      2022-03-08 
12:16:16.000000000 +0100
+++ new/kdecoration-5.24.4/po/zh_CN/kdecoration.po      2022-03-29 
13:17:22.000000000 +0200
@@ -8,7 +8,7 @@
 "Project-Id-Version: kdeorg\n"
 "Report-Msgid-Bugs-To: https://bugs.kde.org\n";
 "POT-Creation-Date: 2021-05-05 00:20+0000\n"
-"PO-Revision-Date: 2022-03-05 15:07\n"
+"PO-Revision-Date: 2022-03-16 15:49\n"
 "Last-Translator: \n"
 "Language-Team: Chinese Simplified\n"
 "Language: zh_CN\n"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdecoration-5.24.3/src/decorationbuttongroup.cpp 
new/kdecoration-5.24.4/src/decorationbuttongroup.cpp
--- old/kdecoration-5.24.3/src/decorationbuttongroup.cpp        2022-03-08 
12:15:55.000000000 +0100
+++ new/kdecoration-5.24.4/src/decorationbuttongroup.cpp        2022-03-29 
13:17:02.000000000 +0200
@@ -9,6 +9,7 @@
 #include "decorationsettings.h"
 
 #include <QDebug>
+#include <QGuiApplication>
 
 namespace KDecoration2
 {
@@ -57,18 +58,33 @@
     }
     setGeometry(QRectF(pos, QSizeF(width, height)));
 
-    // now position all buttons
-    qreal position = pos.x();
-    const auto &constButtons = buttons;
-    for (auto button : constButtons) {
+    QGuiApplication* app = 
qobject_cast<QGuiApplication*>(QCoreApplication::instance());
+    const auto layoutDirection = app ? app->layoutDirection() : 
Qt::LeftToRight;
+
+    qreal leftPosition = pos.x();
+    qreal rightPosition = pos.x() + width;
+
+    if (layoutDirection == Qt::LeftToRight) for (auto button : 
qAsConst(buttons)) {
+        if (!button->isVisible()) {
+            continue;
+        }
+        const auto size = button->size();
+        const auto buttonPos = QPointF(leftPosition, pos.y());
+        button->setGeometry(QRectF(buttonPos, size));
+        leftPosition += size.width() + spacing;
+    } else if (layoutDirection == Qt::RightToLeft) for (auto button : 
qAsConst(buttons)) {
         if (!button->isVisible()) {
             continue;
         }
-        const QSizeF size = button->size();
-        // TODO: center
-        button->setGeometry(QRectF(QPointF(position, pos.y()), size));
-        position += size.width() + spacing;
+        const auto size = button->size();
+        const auto buttonPos = QPointF(rightPosition - size.width(), pos.y());
+        button->setGeometry(QRectF(buttonPos, size));
+        rightPosition -= size.width() + spacing;
+    } else {
+       qCritical() << "There's an unhandled layout direction! This is likely 
an issue of KDecoration2 not being updated to handle it\n"
+                   << "or the application having an invalid layout direction 
set. Either way, this is a critical bug.";
     }
+
     s_layoutRecursion = false;
 }
 
@@ -84,9 +100,14 @@
     : QObject(parent)
     , d(new Private(parent, this))
 {
+    QGuiApplication* app = 
qobject_cast<QGuiApplication*>(QCoreApplication::instance());
+    const auto layoutDirection = app ? app->layoutDirection() : 
Qt::LeftToRight;
     auto settings = parent->settings();
     auto createButtons = [=] {
-        const auto &buttons = (type == Position::Left) ? 
settings->decorationButtonsLeft() : settings->decorationButtonsRight();
+        const auto &buttons =
+            (type == Position::Left) ?
+                (layoutDirection == Qt::LeftToRight ? 
settings->decorationButtonsLeft() : settings->decorationButtonsRight()) :
+                (layoutDirection == Qt::LeftToRight ? 
settings->decorationButtonsRight() : settings->decorationButtonsLeft());
         for (DecorationButtonType type : buttons) {
             if (DecorationButton *b = buttonCreator(type, parent, this)) {
                 addButton(QPointer<DecorationButton>(b));

Reply via email to