Browse Source

Merge pull request #15306 from Chocobo1/icon

Minor UI revise
adaptive-webui-19844
Chocobo1 3 years ago committed by GitHub
parent
commit
7dc7b95bfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      src/gui/fspathedit.cpp
  2. 21
      src/gui/optionsdialog.ui
  3. 2
      src/webui/www/private/views/preferences.html

7
src/gui/fspathedit.cpp

@ -155,26 +155,21 @@ QString FileSystemPathEdit::FileSystemPathEditPrivate::dialogCaptionOrDefault() @@ -155,26 +155,21 @@ QString FileSystemPathEdit::FileSystemPathEditPrivate::dialogCaptionOrDefault()
void FileSystemPathEdit::FileSystemPathEditPrivate::modeChanged()
{
QStyle::StandardPixmap pixmap = QStyle::SP_DialogOpenButton;
bool showDirsOnly = false;
switch (m_mode)
{
case FileSystemPathEdit::Mode::FileOpen:
case FileSystemPathEdit::Mode::FileSave:
#ifdef Q_OS_WIN
pixmap = QStyle::SP_DirOpenIcon;
#endif
showDirsOnly = false;
break;
case FileSystemPathEdit::Mode::DirectoryOpen:
case FileSystemPathEdit::Mode::DirectorySave:
pixmap = QStyle::SP_DirOpenIcon;
showDirsOnly = true;
break;
default:
throw std::logic_error("Unknown FileSystemPathEdit mode");
}
m_browseAction->setIcon(QApplication::style()->standardIcon(pixmap));
m_browseAction->setIcon(QApplication::style()->standardIcon(QStyle::SP_DirOpenIcon));
m_editor->completeDirectoriesOnly(showDirsOnly);
m_validator->setExistingOnly(m_mode != FileSystemPathEdit::Mode::FileSave);

21
src/gui/optionsdialog.ui

@ -1457,6 +1457,9 @@ Manual: Various torrent properties (e.g. save path) must be assigned manually</s @@ -1457,6 +1457,9 @@ Manual: Various torrent properties (e.g. save path) must be assigned manually</s
</item>
<item>
<widget class="QSpinBox" name="spinPort">
<property name="toolTip">
<string>Set to 0 to let your system pick an unused port</string>
</property>
<property name="specialValueText">
<string>Any</string>
</property>
@ -1570,9 +1573,6 @@ Manual: Various torrent properties (e.g. save path) must be assigned manually</s @@ -1570,9 +1573,6 @@ Manual: Various torrent properties (e.g. save path) must be assigned manually</s
<property name="text">
<string>Maximum number of upload slots per torrent:</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item>
<item row="2" column="0">
@ -1580,9 +1580,6 @@ Manual: Various torrent properties (e.g. save path) must be assigned manually</s @@ -1580,9 +1580,6 @@ Manual: Various torrent properties (e.g. save path) must be assigned manually</s
<property name="text">
<string>Global maximum number of upload slots:</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item>
<item row="2" column="1">
@ -1668,9 +1665,6 @@ Manual: Various torrent properties (e.g. save path) must be assigned manually</s @@ -1668,9 +1665,6 @@ Manual: Various torrent properties (e.g. save path) must be assigned manually</s
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
@ -3367,11 +3361,7 @@ Use ';' to split multiple entries. Can use wildcard '*'.</string> @@ -3367,11 +3361,7 @@ Use ';' to split multiple entries. Can use wildcard '*'.</string>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="DNSUsernameTxt">
<property name="maxLength">
<number>50</number>
</property>
</widget>
<widget class="QLineEdit" name="DNSUsernameTxt"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_22">
@ -3382,9 +3372,6 @@ Use ';' to split multiple entries. Can use wildcard '*'.</string> @@ -3382,9 +3372,6 @@ Use ';' to split multiple entries. Can use wildcard '*'.</string>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="DNSPasswordTxt">
<property name="maxLength">
<number>50</number>
</property>
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>

2
src/webui/www/private/views/preferences.html

@ -231,7 +231,7 @@ @@ -231,7 +231,7 @@
<legend>QBT_TR(Listening Port)QBT_TR[CONTEXT=OptionsDialog]</legend>
<div class="formRow">
<label for="port_value">QBT_TR(Port used for incoming connections:)QBT_TR[CONTEXT=OptionsDialog]</label>
<input type="text" id="port_value" style="width: 4em;" />
<input type="text" id="port_value" style="width: 4em;" title="QBT_TR(Set to 0 to let your system pick an unused port)QBT_TR[CONTEXT=OptionsDialog]" />
<button style="margin-left: 1em;" onclick="qBittorrent.Preferences.generateRandomPort();">QBT_TR(Random)QBT_TR[CONTEXT=OptionsDialog]</button>
</div>
<div class="formRow">

Loading…
Cancel
Save