Avidemux Forum

Avidemux => Main version 2.6 => Topic started by: eumagga0x2a on July 28, 2016, 02:24:14 PM

Title: [cosmetics] Not enough space for current time, the first digit is cut off.
Post by: eumagga0x2a on July 28, 2016, 02:24:14 PM
As seen on screenshots in http://avidemux.org/smif/index.php/topic,16954.msg75828.html#msg75828 (http://avidemux.org/smif/index.php/topic,16954.msg75828.html#msg75828) or in http://avidemux.org/smif/index.php/topic,16955.msg75847.html#msg75847 (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 (https://github.com/mean00/avidemux2/blob/master/avidemux/qt4/ADM_userInterfaces/ADM_gui/gui2.ui#L1345)) 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>
Title: Re: [cosmetics] Not enough space for current time, the first digit is cut off.
Post by: eumagga0x2a on July 28, 2016, 06:37:32 PM
Thanks a lot for accepting at least the first hunk of the patch!
Title: Re: [cosmetics] Not enough space for current time, the first digit is cut off.
Post by: mean on July 28, 2016, 07:54:03 PM
oops i missed one
Title: Re: [cosmetics] Not enough space for current time, the first digit is cut off.
Post by: eumagga0x2a on July 29, 2016, 09:52:20 AM
Thanks!

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