]> git.lyx.org Git - features.git/commitdiff
Minor improvements to the screen width UI
authorJuergen Spitzmueller <spitz@lyx.org>
Sat, 29 Oct 2022 09:17:22 +0000 (11:17 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Sat, 29 Oct 2022 09:17:22 +0000 (11:17 +0200)
* fix order of input and unit widgets
* remove redundant "Screen used" label
* Add tooltip

src/frontends/qt/GuiPrefs.cpp
src/frontends/qt/ui/PrefEditUi.ui

index 721bacef0df64411a7b992758e39f37834cf2513..03d630d397f3b1350bb6e315cdd9b3ed64841fa8 100644 (file)
@@ -2833,7 +2833,6 @@ PrefEdit::PrefEdit(GuiPreferences * form)
 void PrefEdit::on_screenLimitCB_toggled(bool const state)
 {
        screenWidthLE->setEnabled(state);
-       screenWidthLA->setEnabled(state);
        screenWidthUnitCO->setEnabled(state);
        changed();
 }
@@ -2896,7 +2895,6 @@ void PrefEdit::updateRC(LyXRC const & rc)
        screenWidthUnitCO->setEnabled(rc.screen_limit);
        screenLimitCB->setChecked(rc.screen_limit);
        screenWidthLE->setEnabled(rc.screen_limit);
-       screenWidthLA->setEnabled(rc.screen_limit); 
 }
 
 
index 7a7e30bae1beaa5f9be1efa1608e0cd9c0f0d300..2a6a08263b21da97ea0df74fd9a9b114bc1f4cfd 100644 (file)
        </widget>
       </item>
       <item row="10" column="0" colspan="3">
-        <layout class="QHBoxLayout" name="horizontalLayout_4">
-         <item>
-          <widget class="QCheckBox" name="screenLimitCB">
-           <property name="text">
-            <string>&amp;Limit text width</string>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <spacer name="horizontalSpacer_9">
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeType">
-            <enum>QSizePolicy::Fixed</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>10</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-         <item>
-           <widget class="QLabel" name="screenWidthLA">
-             <property name="text">
-               <string>Screen used:</string>
-             </property>
-           </widget>
-         </item>
-         <item>
-           <widget class="lyx::frontend::LengthCombo" name="screenWidthUnitCO" />
-         </item>
-         <item>
-           <widget class="QLineEdit" name="screenWidthLE" />
-         </item>
-         <item>
-          <spacer name="horizontalSpacer_2">
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>157</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-        </layout>
-       </item>
+       <layout class="QHBoxLayout" name="horizontalLayout_4">
+        <item>
+         <widget class="QCheckBox" name="screenLimitCB">
+          <property name="toolTip">
+           <string>Limit the width of the text in the work area to the specified length</string>
+          </property>
+          <property name="text">
+           <string>&amp;Limit text width</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <spacer name="horizontalSpacer_9">
+          <property name="orientation">
+           <enum>Qt::Horizontal</enum>
+          </property>
+          <property name="sizeType">
+           <enum>QSizePolicy::Fixed</enum>
+          </property>
+          <property name="sizeHint" stdset="0">
+           <size>
+            <width>10</width>
+            <height>20</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+        <item>
+         <widget class="QLineEdit" name="screenWidthLE">
+          <property name="toolTip">
+           <string>Limit the width of the text in the work area to the specified length</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="lyx::frontend::LengthCombo" name="screenWidthUnitCO"/>
+        </item>
+        <item>
+         <spacer name="horizontalSpacer_2">
+          <property name="orientation">
+           <enum>Qt::Horizontal</enum>
+          </property>
+          <property name="sizeHint" stdset="0">
+           <size>
+            <width>157</width>
+            <height>20</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+       </layout>
+      </item>
      </layout>
     </widget>
    </item>
   </layout>
  </widget>
  <layoutdefault spacing="4" margin="9"/>
- <customwidgets> 
-  <customwidget> 
-    <class>lyx::frontend::LengthCombo</class> 
-    <extends>QComboBox</extends> 
-    <header>LengthCombo.h</header> 
-  </customwidget> 
- </customwidgets> 
+ <customwidgets>
+  <customwidget>
+   <class>lyx::frontend::LengthCombo</class>
+   <extends>QComboBox</extends>
+   <header>LengthCombo.h</header>
+  </customwidget>
+ </customwidgets>
  <tabstops>
   <tabstop>cursorFollowsCB</tabstop>
   <tabstop>cursorWidthSB</tabstop>