commit 1401f8158be757820fc3e820097fa89eaa885cd9
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Mon Mar 8 12:11:11 2021 +0000
Ensure text margins in current time display are zero (rfbz#5948)
avidemux.spec | 6 +++++-
force_currentTime.patch | 39 +++++++++++++++++++++++++++++++++++++++
2 files changed, 44 insertions(+), 1 deletion(-)
---
diff --git a/avidemux.spec b/avidemux.spec
index 539b063..fc94dd2 100644
--- a/avidemux.spec
+++ b/avidemux.spec
@@ -10,13 +10,14 @@
Name: avidemux
Version: 2.7.8
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Graphical video editing and transcoding tool
License: GPLv2+
URL:
http://www.avidemux.org
Source0:
http://downloads.sourceforge.net/%{name}/%{name}_%{version}.tar.gz
+Patch0:
https://github.com/mean00/avidemux2/commit/991bd96c4b729e62300caf87ff343b...
# Don't try to build on arm, aarch64 or ppc
ExclusiveArch: i686 x86_64
@@ -311,6 +312,9 @@ fi
%changelog
+* Mon Mar 08 2021 Leigh Scott <leigh123linux(a)gmail.com> - 2.7.8-2
+- Ensure text margins in current time display are zero (rfbz#5948)
+
* Sun Mar 07 2021 Leigh Scott <leigh123linux(a)gmail.com> - 2.7.8-1
- Update to 2.7.8.
diff --git a/force_currentTime.patch b/force_currentTime.patch
new file mode 100644
index 0000000..45c634b
--- /dev/null
+++ b/force_currentTime.patch
@@ -0,0 +1,39 @@
+From 991bd96c4b729e62300caf87ff343b046f41616f Mon Sep 17 00:00:00 2001
+From: eumagga0x2a <eumagga0x2a(a)users.noreply.github.com>
+Date: Sun, 7 Mar 2021 20:28:59 +0100
+Subject: [PATCH] [Qt] Ensure text margins in current time display are zero
+
+Some Qt themes, namely Adwaita, mess with QLineEdit text margins after the
+size of the widget has been calculated, squeezing content partially out of
+view of a fixed size. Reset margins back to zero behind their back.
+---
+ avidemux/qt4/ADM_UIs/src/DIA_flyDialog.cpp | 3 +++
+ avidemux/qt4/ADM_userInterfaces/ADM_gui/Q_gui2.cpp | 1 +
+ 2 files changed, 4 insertions(+)
+
+diff --git a/avidemux/qt4/ADM_UIs/src/DIA_flyDialog.cpp
b/avidemux/qt4/ADM_UIs/src/DIA_flyDialog.cpp
+index 6f9934a70..643bf778e 100644
+--- a/avidemux/qt4/ADM_UIs/src/DIA_flyDialog.cpp
++++ b/avidemux/qt4/ADM_UIs/src/DIA_flyDialog.cpp
+@@ -260,6 +260,9 @@ bool ADM_flyDialog::addControl(QHBoxLayout
*horizontalLayout_4)
+ {
+
_parent->setSizePolicy(QSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum));
+ _control=new flyControl(horizontalLayout_4);
++ _parent->adjustSize(); // force currentTime size calculation
++ _control->currentTime->setTextMargins(0,0,0,0); // counteract Adwaita
messing with text margins
++
+ QObject::connect(_control->pushButton_next
,SIGNAL(clicked()),this,SLOT(nextImage()));
+ QObject::connect(_control->pushButton_back1mn
,SIGNAL(clicked()),this,SLOT(backOneMinute()));
+ QObject::connect(_control->pushButton_fwd1mn
,SIGNAL(clicked()),this,SLOT(fwdOneMinute()));
+diff --git a/avidemux/qt4/ADM_userInterfaces/ADM_gui/Q_gui2.cpp
b/avidemux/qt4/ADM_userInterfaces/ADM_gui/Q_gui2.cpp
+index a53c30d68..c2b8a11b2 100644
+--- a/avidemux/qt4/ADM_userInterfaces/ADM_gui/Q_gui2.cpp
++++ b/avidemux/qt4/ADM_userInterfaces/ADM_gui/Q_gui2.cpp
+@@ -550,6 +550,7 @@ MainWindow::MainWindow(const vector<IScriptEngine*>&
scriptEngines) : _scriptEng
+ widgetsUpdateTooltips();
+
+ this->adjustSize();
++ ui.currentTime->setTextMargins(0,0,0,0); // some Qt themes mess with text
margins
+
+ threshold = RESIZE_THRESHOLD;
+ actZoomCalled = false;