- enhancement: show custom icon set folder in options -> enviroment -> folders

This commit is contained in:
royqh1979@gmail.com 2022-01-27 12:47:57 +08:00
parent 15c6282c36
commit e1631c211a
6 changed files with 76 additions and 28 deletions

View File

@ -1,5 +1,6 @@
Red Panda C++ Version 0.14.0
- enhancement: custom icon set ( in the configuration folder)
- enhancement: show custom icon set folder in options -> enviroment -> folders
Red Panda C++ Version 0.13.4
- fix: when copy comments, don't auto indent

Binary file not shown.

View File

@ -2060,19 +2060,26 @@ Are you really want to continue?</oldsource>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/environmentfolderswidget.ui" line="27"/>
<location filename="settingsdialog/environmentfolderswidget.ui" line="66"/>
<source>Configuration folder:</source>
<oldsource>Confirugration folder:</oldsource>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/environmentfolderswidget.ui" line="63"/>
<location filename="settingsdialog/environmentfolderswidget.ui" line="66"/>
<location filename="settingsdialog/environmentfolderswidget.ui" line="73"/>
<location filename="settingsdialog/environmentfolderswidget.ui" line="76"/>
<location filename="settingsdialog/environmentfolderswidget.ui" line="101"/>
<location filename="settingsdialog/environmentfolderswidget.ui" line="104"/>
<source>Open in browser</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/environmentfolderswidget.ui" line="77"/>
<location filename="settingsdialog/environmentfolderswidget.ui" line="87"/>
<source>Custom icon sets folder:</source>
<translation>:</translation>
</message>
<message>
<location filename="settingsdialog/environmentfolderswidget.ui" line="56"/>
<source>Remove all custom settings and exit</source>
<translation>退</translation>
</message>

View File

@ -40,11 +40,11 @@ EnvironmentFoldersWidget::~EnvironmentFoldersWidget()
void EnvironmentFoldersWidget::doLoad()
{
ui->txtConfigFolder->setText(pSettings->dirs().config());
ui->txtIconSetFolder->setText(pSettings->dirs().config(Settings::Dirs::DataType::IconSet));
}
void EnvironmentFoldersWidget::doSave()
{
}
void EnvironmentFoldersWidget::on_btnOpenConfigFolderInBrowser_clicked()
@ -75,5 +75,15 @@ void EnvironmentFoldersWidget::on_btnResetDefault_clicked()
void EnvironmentFoldersWidget::updateIcons(const QSize &size)
{
pIconsManager->setIcon(ui->btnOpenConfigFolderInBrowser,IconsManager::ACTION_FILE_OPEN_FOLDER);
pIconsManager->setIcon(ui->btnOpenIconSetFolderInFileBrowser,IconsManager::ACTION_FILE_OPEN_FOLDER);
}
void EnvironmentFoldersWidget::on_btnOpenIconSetFolderInFileBrowser_clicked()
{
QDesktopServices::openUrl(
QUrl("file:///"+
includeTrailingPathDelimiter(pSettings->dirs().config(Settings::Dirs::DataType::IconSet)),QUrl::TolerantMode));
}

View File

@ -45,6 +45,8 @@ private slots:
void on_btnResetDefault_clicked();
// SettingsWidget interface
void on_btnOpenIconSetFolderInFileBrowser_clicked();
protected:
void updateIcons(const QSize &size) override;
};

View File

@ -21,14 +21,7 @@
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Configuration folder:</string>
</property>
</widget>
</item>
<item row="2" column="0">
<item row="3" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
@ -41,7 +34,7 @@
</property>
</spacer>
</item>
<item row="1" column="0" colspan="2">
<item row="2" column="0" colspan="3">
<widget class="QWidget" name="widget" native="true">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
@ -58,6 +51,23 @@
</spacer>
</item>
<item>
<widget class="QPushButton" name="btnResetDefault">
<property name="text">
<string>Remove all custom settings and exit</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Configuration folder:</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QToolButton" name="btnOpenConfigFolderInBrowser">
<property name="toolTip">
<string>Open in browser</string>
@ -71,14 +81,32 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnResetDefault">
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Remove all custom settings and exit</string>
<string>Custom icon sets folder:</string>
</property>
</widget>
</item>
</layout>
<item row="1" column="1">
<widget class="QLineEdit" name="txtIconSetFolder">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QToolButton" name="btnOpenIconSetFolderInFileBrowser">
<property name="toolTip">
<string>Open in browser</string>
</property>
<property name="text">
<string>Open in browser</string>
</property>
<property name="icon">
<iconset resource="../icons.qrc">
<normaloff>:/icons/images/newlook24/053-open.png</normaloff>:/icons/images/newlook24/053-open.png</iconset>
</property>
</widget>
</item>
</layout>