[cosmetics] Not enough space for current time, the first digit is cut off.

Started by eumagga0x2a, July 28, 2016, 02:24:14 PM

Previous topic - Next topic

eumagga0x2a

As seen on screenshots in http://avidemux.org/smif/index.php/topic,16954.msg75828.html#msg75828 or in http://avidemux.org/smif/index.php/topic,16955.msg75847.html#msg75847, the first digit of the current time indicator is cut off as the maximum width of the widget (84px) is not enough to accomodate the text rendered at the usual default 10pt font size on Linux. There is no loss of information as the invisible digit is in almost all practical situations a zero, but it feels quite awkward.

Of course, due to the width being specified in pixels, choosing a larger font size would break the appearance again. Windows defaults to 9pt, so the present low maximum width might be still a non-issue on Windows.

The following trivial patch adds 16px more space, which allows standard 10pt fonts on Linux to fit into the box, and aligns the text at the center. The result looks fine at 9pt as well.

diff --git a/avidemux/qt4/ADM_userInterfaces/ADM_gui/gui2.ui b/avidemux/qt4/ADM_userInterfaces/ADM_gui/gui2.ui
index eed5a55..27f9105 100644
--- a/avidemux/qt4/ADM_userInterfaces/ADM_gui/gui2.ui
+++ b/avidemux/qt4/ADM_userInterfaces/ADM_gui/gui2.ui
@@ -1342,7 +1342,7 @@
            </property>
            <property name="maximumSize">
             <size>
-             <width>84</width>
+             <width>100</width>
              <height>16777215</height>
             </size>
            </property>
@@ -1352,6 +1352,9 @@
            <property name="maxLength">
             <number>12</number>
            </property>
+           <property name="alignment">
+            <set>Qt::AlignCenter</set>
+           </property>
            <property name="readOnly">
             <bool>true</bool>
            </property>

eumagga0x2a

Thanks a lot for accepting at least the first hunk of the patch!

mean


eumagga0x2a

Thanks!

ìÅ'ì•…ê°â,¬ (musician) 42