Minor improvements to the screen width UI

* fix order of input and unit widgets
* remove redundant "Screen used" label
* Add tooltip
This commit is contained in:
Juergen Spitzmueller 2022-10-29 11:17:22 +02:00
parent 172e544e2c
commit 6415afc1fe
2 changed files with 59 additions and 61 deletions

View 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);
}

View File

@ -213,58 +213,58 @@
</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>
@ -401,13 +401,13 @@
</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>