Make icon sizes configurable, increase default sizes for icons
Fixes #250
This commit is contained in:
@@ -50,6 +50,7 @@
|
|||||||
#include "groupbydialog.h"
|
#include "groupbydialog.h"
|
||||||
#include "ui_collectionfilterwidget.h"
|
#include "ui_collectionfilterwidget.h"
|
||||||
#include "widgets/qsearchfield.h"
|
#include "widgets/qsearchfield.h"
|
||||||
|
#include "settings/appearancesettingspage.h"
|
||||||
|
|
||||||
CollectionFilterWidget::CollectionFilterWidget(QWidget *parent)
|
CollectionFilterWidget::CollectionFilterWidget(QWidget *parent)
|
||||||
: QWidget(parent),
|
: QWidget(parent),
|
||||||
@@ -135,10 +136,22 @@ CollectionFilterWidget::CollectionFilterWidget(QWidget *parent)
|
|||||||
|
|
||||||
connect(ui_->filter, SIGNAL(textChanged(QString)), SLOT(FilterTextChanged(QString)));
|
connect(ui_->filter, SIGNAL(textChanged(QString)), SLOT(FilterTextChanged(QString)));
|
||||||
|
|
||||||
|
ReloadSettings();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CollectionFilterWidget::~CollectionFilterWidget() { delete ui_; }
|
CollectionFilterWidget::~CollectionFilterWidget() { delete ui_; }
|
||||||
|
|
||||||
|
void CollectionFilterWidget::ReloadSettings() {
|
||||||
|
|
||||||
|
QSettings s;
|
||||||
|
s.beginGroup(AppearanceSettingsPage::kSettingsGroup);
|
||||||
|
int iconsize = s.value(AppearanceSettingsPage::kIconSizeConfigureButtons, 20).toInt();
|
||||||
|
s.endGroup();
|
||||||
|
ui_->options->setIconSize(QSize(iconsize, iconsize));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
QString CollectionFilterWidget::group_by() {
|
QString CollectionFilterWidget::group_by() {
|
||||||
|
|
||||||
if (settings_prefix_.isEmpty()) {
|
if (settings_prefix_.isEmpty()) {
|
||||||
|
|||||||
@@ -79,6 +79,8 @@ class CollectionFilterWidget : public QWidget {
|
|||||||
QString group_by();
|
QString group_by();
|
||||||
QString group_by(const int number);
|
QString group_by(const int number);
|
||||||
|
|
||||||
|
void ReloadSettings();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void SetQueryMode(QueryOptions::QueryMode query_mode);
|
void SetQueryMode(QueryOptions::QueryMode query_mode);
|
||||||
void FocusOnFilter(QKeyEvent *e);
|
void FocusOnFilter(QKeyEvent *e);
|
||||||
|
|||||||
@@ -45,4 +45,7 @@ CollectionViewContainer::CollectionViewContainer(QWidget *parent) : QWidget(pare
|
|||||||
CollectionViewContainer::~CollectionViewContainer() { delete ui_; }
|
CollectionViewContainer::~CollectionViewContainer() { delete ui_; }
|
||||||
CollectionView *CollectionViewContainer::view() const { return ui_->view; }
|
CollectionView *CollectionViewContainer::view() const { return ui_->view; }
|
||||||
CollectionFilterWidget *CollectionViewContainer::filter() const { return ui_->filter; }
|
CollectionFilterWidget *CollectionViewContainer::filter() const { return ui_->filter; }
|
||||||
void CollectionViewContainer::ReloadSettings() { view()->ReloadSettings(); }
|
void CollectionViewContainer::ReloadSettings() {
|
||||||
|
filter()->ReloadSettings();
|
||||||
|
view()->ReloadSettings();
|
||||||
|
}
|
||||||
|
|||||||
@@ -911,6 +911,16 @@ void MainWindow::ReloadSettings() {
|
|||||||
menu_playmode_ = BehaviourSettingsPage::PlayBehaviour(s.value("menu_playmode", BehaviourSettingsPage::PlayBehaviour_IfStopped).toInt());
|
menu_playmode_ = BehaviourSettingsPage::PlayBehaviour(s.value("menu_playmode", BehaviourSettingsPage::PlayBehaviour_IfStopped).toInt());
|
||||||
s.endGroup();
|
s.endGroup();
|
||||||
|
|
||||||
|
s.beginGroup(AppearanceSettingsPage::kSettingsGroup);
|
||||||
|
int iconsize = s.value(AppearanceSettingsPage::kIconSizePlayControlButtons, 32).toInt();
|
||||||
|
s.endGroup();
|
||||||
|
|
||||||
|
ui_->back_button->setIconSize(QSize(iconsize, iconsize));
|
||||||
|
ui_->pause_play_button->setIconSize(QSize(iconsize, iconsize));
|
||||||
|
ui_->stop_button->setIconSize(QSize(iconsize, iconsize));
|
||||||
|
ui_->forward_button->setIconSize(QSize(iconsize, iconsize));
|
||||||
|
ui_->button_love->setIconSize(QSize(iconsize, iconsize));
|
||||||
|
|
||||||
s.beginGroup(BackendSettingsPage::kSettingsGroup);
|
s.beginGroup(BackendSettingsPage::kSettingsGroup);
|
||||||
bool volume_control = s.value("volume_control", true).toBool();
|
bool volume_control = s.value("volume_control", true).toBool();
|
||||||
s.endGroup();
|
s.endGroup();
|
||||||
@@ -968,6 +978,9 @@ void MainWindow::ReloadAllSettings() {
|
|||||||
album_cover_choice_controller_->ReloadSettings();
|
album_cover_choice_controller_->ReloadSettings();
|
||||||
if (cover_manager_.get()) cover_manager_->ReloadSettings();
|
if (cover_manager_.get()) cover_manager_->ReloadSettings();
|
||||||
context_view_->ReloadSettings();
|
context_view_->ReloadSettings();
|
||||||
|
file_view_->ReloadSettings();
|
||||||
|
queue_view_->ReloadSettings();
|
||||||
|
playlist_list_->ReloadSettings();
|
||||||
app_->cover_providers()->ReloadSettings();
|
app_->cover_providers()->ReloadSettings();
|
||||||
app_->lyrics_providers()->ReloadSettings();
|
app_->lyrics_providers()->ReloadSettings();
|
||||||
#ifdef HAVE_SUBSONIC
|
#ifdef HAVE_SUBSONIC
|
||||||
|
|||||||
@@ -124,8 +124,8 @@
|
|||||||
<widget class="QToolButton" name="back_button">
|
<widget class="QToolButton" name="back_button">
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
<width>22</width>
|
<width>32</width>
|
||||||
<height>22</height>
|
<height>32</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="autoRaise">
|
<property name="autoRaise">
|
||||||
@@ -137,8 +137,8 @@
|
|||||||
<widget class="QToolButton" name="pause_play_button">
|
<widget class="QToolButton" name="pause_play_button">
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
<width>22</width>
|
<width>32</width>
|
||||||
<height>22</height>
|
<height>32</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="autoRaise">
|
<property name="autoRaise">
|
||||||
@@ -153,8 +153,8 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
<width>22</width>
|
<width>32</width>
|
||||||
<height>22</height>
|
<height>32</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="popupMode">
|
<property name="popupMode">
|
||||||
@@ -169,8 +169,8 @@
|
|||||||
<widget class="QToolButton" name="forward_button">
|
<widget class="QToolButton" name="forward_button">
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
<width>22</width>
|
<width>32</width>
|
||||||
<height>22</height>
|
<height>32</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="autoRaise">
|
<property name="autoRaise">
|
||||||
@@ -207,8 +207,8 @@
|
|||||||
<widget class="QToolButton" name="button_love">
|
<widget class="QToolButton" name="button_love">
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
<width>22</width>
|
<width>32</width>
|
||||||
<height>22</height>
|
<height>32</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="autoRaise">
|
<property name="autoRaise">
|
||||||
|
|||||||
@@ -102,7 +102,11 @@ void InternetCollectionView::SetFilter(CollectionFilterWidget *filter) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InternetCollectionView::ReloadSettings() {}
|
void InternetCollectionView::ReloadSettings() {
|
||||||
|
|
||||||
|
if (filter_) filter_->ReloadSettings();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void InternetCollectionView::SaveFocus() {
|
void InternetCollectionView::SaveFocus() {
|
||||||
|
|
||||||
|
|||||||
@@ -51,4 +51,9 @@ InternetCollectionViewContainer::InternetCollectionViewContainer(QWidget *parent
|
|||||||
|
|
||||||
InternetCollectionViewContainer::~InternetCollectionViewContainer() { delete ui_; }
|
InternetCollectionViewContainer::~InternetCollectionViewContainer() { delete ui_; }
|
||||||
|
|
||||||
|
void InternetCollectionViewContainer::ReloadSettings() {
|
||||||
|
filter()->ReloadSettings();
|
||||||
|
view()->ReloadSettings();
|
||||||
|
}
|
||||||
|
|
||||||
void InternetCollectionViewContainer::contextMenuEvent(QContextMenuEvent *e) { Q_UNUSED(e); }
|
void InternetCollectionViewContainer::contextMenuEvent(QContextMenuEvent *e) { Q_UNUSED(e); }
|
||||||
|
|||||||
@@ -45,6 +45,8 @@ class InternetCollectionViewContainer : public QWidget {
|
|||||||
explicit InternetCollectionViewContainer(QWidget *parent = nullptr);
|
explicit InternetCollectionViewContainer(QWidget *parent = nullptr);
|
||||||
~InternetCollectionViewContainer() override;
|
~InternetCollectionViewContainer() override;
|
||||||
|
|
||||||
|
void ReloadSettings();
|
||||||
|
|
||||||
QStackedWidget *stacked() const { return ui_->stacked; }
|
QStackedWidget *stacked() const { return ui_->stacked; }
|
||||||
QWidget *help_page() const { return ui_->help_page; }
|
QWidget *help_page() const { return ui_->help_page; }
|
||||||
QWidget *internetcollection_page() const { return ui_->internetcollection_page; }
|
QWidget *internetcollection_page() const { return ui_->internetcollection_page; }
|
||||||
@@ -55,7 +57,6 @@ class InternetCollectionViewContainer : public QWidget {
|
|||||||
QPushButton *button_abort() const { return ui_->abort; }
|
QPushButton *button_abort() const { return ui_->abort; }
|
||||||
QLabel *status() const { return ui_->status; }
|
QLabel *status() const { return ui_->status; }
|
||||||
QProgressBar *progressbar() const { return ui_->progressbar; }
|
QProgressBar *progressbar() const { return ui_->progressbar; }
|
||||||
void ReloadSettings() { view()->ReloadSettings(); }
|
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void contextMenuEvent(QContextMenuEvent *e) override;
|
void contextMenuEvent(QContextMenuEvent *e) override;
|
||||||
|
|||||||
@@ -85,6 +85,7 @@
|
|||||||
#include "internetsearchsortmodel.h"
|
#include "internetsearchsortmodel.h"
|
||||||
#include "internetsearchview.h"
|
#include "internetsearchview.h"
|
||||||
#include "ui_internetsearchview.h"
|
#include "ui_internetsearchview.h"
|
||||||
|
#include "settings/appearancesettingspage.h"
|
||||||
|
|
||||||
using std::placeholders::_1;
|
using std::placeholders::_1;
|
||||||
using std::placeholders::_2;
|
using std::placeholders::_2;
|
||||||
@@ -245,6 +246,11 @@ void InternetSearchView::ReloadSettings() {
|
|||||||
CollectionModel::GroupBy(s.value("search_group_by3", int(CollectionModel::GroupBy_None)).toInt())));
|
CollectionModel::GroupBy(s.value("search_group_by3", int(CollectionModel::GroupBy_None)).toInt())));
|
||||||
s.endGroup();
|
s.endGroup();
|
||||||
|
|
||||||
|
s.beginGroup(AppearanceSettingsPage::kSettingsGroup);
|
||||||
|
int iconsize = s.value(AppearanceSettingsPage::kIconSizeConfigureButtons, 20).toInt();
|
||||||
|
s.endGroup();
|
||||||
|
ui_->settings->setIconSize(QSize(iconsize, iconsize));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InternetSearchView::showEvent(QShowEvent *e) {
|
void InternetSearchView::showEvent(QShowEvent *e) {
|
||||||
|
|||||||
@@ -54,6 +54,12 @@
|
|||||||
<height>0</height>
|
<height>0</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>16</width>
|
||||||
|
<height>16</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="popupMode">
|
<property name="popupMode">
|
||||||
<enum>QToolButton::InstantPopup</enum>
|
<enum>QToolButton::InstantPopup</enum>
|
||||||
</property>
|
</property>
|
||||||
@@ -225,7 +231,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>398</width>
|
<width>398</width>
|
||||||
<height>528</height>
|
<height>527</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||||
|
|||||||
@@ -85,7 +85,12 @@ InternetSongsView::InternetSongsView(Application *app, InternetService *service,
|
|||||||
|
|
||||||
InternetSongsView::~InternetSongsView() { delete ui_; }
|
InternetSongsView::~InternetSongsView() { delete ui_; }
|
||||||
|
|
||||||
void InternetSongsView::ReloadSettings() {}
|
void InternetSongsView::ReloadSettings() {
|
||||||
|
|
||||||
|
ui_->filter->ReloadSettings();
|
||||||
|
ui_->view->ReloadSettings();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void InternetSongsView::OpenSettingsDialog() {
|
void InternetSongsView::OpenSettingsDialog() {
|
||||||
app_->OpenSettingsDialogAtPage(service_->settings_page());
|
app_->OpenSettingsDialogAtPage(service_->settings_page());
|
||||||
|
|||||||
@@ -191,7 +191,20 @@ InternetTabsView::~InternetTabsView() {
|
|||||||
delete ui_;
|
delete ui_;
|
||||||
}
|
}
|
||||||
|
|
||||||
void InternetTabsView::ReloadSettings() { ui_->search_view->ReloadSettings(); }
|
void InternetTabsView::ReloadSettings() {
|
||||||
|
|
||||||
|
if (service_->artists_collection_model()) {
|
||||||
|
ui_->artists_collection->view()->ReloadSettings();
|
||||||
|
}
|
||||||
|
if (service_->albums_collection_model()) {
|
||||||
|
ui_->albums_collection->view()->ReloadSettings();
|
||||||
|
}
|
||||||
|
if (service_->songs_collection_model()) {
|
||||||
|
ui_->songs_collection->view()->ReloadSettings();
|
||||||
|
}
|
||||||
|
ui_->search_view->ReloadSettings();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void InternetTabsView::GetArtists() {
|
void InternetTabsView::GetArtists() {
|
||||||
|
|
||||||
|
|||||||
@@ -56,6 +56,7 @@
|
|||||||
#include "playlistparsers/playlistparser.h"
|
#include "playlistparsers/playlistparser.h"
|
||||||
#include "ui_playlistcontainer.h"
|
#include "ui_playlistcontainer.h"
|
||||||
#include "widgets/qsearchfield.h"
|
#include "widgets/qsearchfield.h"
|
||||||
|
#include "settings/appearancesettingspage.h"
|
||||||
|
|
||||||
const char *PlaylistContainer::kSettingsGroup = "Playlist";
|
const char *PlaylistContainer::kSettingsGroup = "Playlist";
|
||||||
const int PlaylistContainer::kFilterDelayMs = 100;
|
const int PlaylistContainer::kFilterDelayMs = 100;
|
||||||
@@ -231,6 +232,18 @@ void PlaylistContainer::SetViewModel(Playlist *playlist) {
|
|||||||
|
|
||||||
void PlaylistContainer::ReloadSettings() {
|
void PlaylistContainer::ReloadSettings() {
|
||||||
|
|
||||||
|
QSettings s;
|
||||||
|
s.beginGroup(AppearanceSettingsPage::kSettingsGroup);
|
||||||
|
int iconsize_playlist_buttons = s.value(AppearanceSettingsPage::kIconSizePlaylistButtons, 20).toInt();
|
||||||
|
s.endGroup();
|
||||||
|
|
||||||
|
ui_->create_new->setIconSize(QSize(iconsize_playlist_buttons, iconsize_playlist_buttons));
|
||||||
|
ui_->load->setIconSize(QSize(iconsize_playlist_buttons, iconsize_playlist_buttons));
|
||||||
|
ui_->save->setIconSize(QSize(iconsize_playlist_buttons, iconsize_playlist_buttons));
|
||||||
|
ui_->clear->setIconSize(QSize(iconsize_playlist_buttons, iconsize_playlist_buttons));
|
||||||
|
ui_->undo->setIconSize(QSize(iconsize_playlist_buttons, iconsize_playlist_buttons));
|
||||||
|
ui_->redo->setIconSize(QSize(iconsize_playlist_buttons, iconsize_playlist_buttons));
|
||||||
|
|
||||||
bool playlist_clear = settings_.value("playlist_clear", true).toBool();
|
bool playlist_clear = settings_.value("playlist_clear", true).toBool();
|
||||||
if (playlist_clear) {
|
if (playlist_clear) {
|
||||||
ui_->clear->show();
|
ui_->clear->show();
|
||||||
|
|||||||
@@ -61,8 +61,8 @@
|
|||||||
<widget class="QToolButton" name="create_new">
|
<widget class="QToolButton" name="create_new">
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
<width>16</width>
|
<width>20</width>
|
||||||
<height>16</height>
|
<height>20</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="autoRaise">
|
<property name="autoRaise">
|
||||||
@@ -74,8 +74,8 @@
|
|||||||
<widget class="QToolButton" name="load">
|
<widget class="QToolButton" name="load">
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
<width>16</width>
|
<width>20</width>
|
||||||
<height>16</height>
|
<height>20</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="autoRaise">
|
<property name="autoRaise">
|
||||||
@@ -87,8 +87,8 @@
|
|||||||
<widget class="QToolButton" name="save">
|
<widget class="QToolButton" name="save">
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
<width>16</width>
|
<width>20</width>
|
||||||
<height>16</height>
|
<height>20</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="autoRaise">
|
<property name="autoRaise">
|
||||||
@@ -100,8 +100,8 @@
|
|||||||
<widget class="QToolButton" name="clear">
|
<widget class="QToolButton" name="clear">
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
<width>16</width>
|
<width>20</width>
|
||||||
<height>16</height>
|
<height>20</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="autoRaise">
|
<property name="autoRaise">
|
||||||
@@ -113,8 +113,8 @@
|
|||||||
<widget class="QToolButton" name="undo">
|
<widget class="QToolButton" name="undo">
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
<width>16</width>
|
<width>20</width>
|
||||||
<height>16</height>
|
<height>20</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="autoRaise">
|
<property name="autoRaise">
|
||||||
@@ -126,8 +126,8 @@
|
|||||||
<widget class="QToolButton" name="redo">
|
<widget class="QToolButton" name="redo">
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
<width>16</width>
|
<width>20</width>
|
||||||
<height>16</height>
|
<height>20</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="autoRaise">
|
<property name="autoRaise">
|
||||||
|
|||||||
@@ -36,6 +36,7 @@
|
|||||||
#include <QSize>
|
#include <QSize>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
|
#include <QSettings>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QInputDialog>
|
#include <QInputDialog>
|
||||||
#include <QToolButton>
|
#include <QToolButton>
|
||||||
@@ -53,6 +54,7 @@
|
|||||||
#include "playlistmanager.h"
|
#include "playlistmanager.h"
|
||||||
#include "ui_playlistlistcontainer.h"
|
#include "ui_playlistlistcontainer.h"
|
||||||
#include "organise/organisedialog.h"
|
#include "organise/organisedialog.h"
|
||||||
|
#include "settings/appearancesettingspage.h"
|
||||||
#ifndef Q_OS_WIN
|
#ifndef Q_OS_WIN
|
||||||
# include "device/devicemanager.h"
|
# include "device/devicemanager.h"
|
||||||
# include "device/devicestatefiltermodel.h"
|
# include "device/devicestatefiltermodel.h"
|
||||||
@@ -118,10 +120,52 @@ PlaylistListContainer::PlaylistListContainer(QWidget *parent)
|
|||||||
|
|
||||||
model_->invisibleRootItem()->setData(PlaylistListModel::Type_Folder, PlaylistListModel::Role_Type);
|
model_->invisibleRootItem()->setData(PlaylistListModel::Type_Folder, PlaylistListModel::Role_Type);
|
||||||
|
|
||||||
|
ReloadSettings();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PlaylistListContainer::~PlaylistListContainer() { delete ui_; }
|
PlaylistListContainer::~PlaylistListContainer() { delete ui_; }
|
||||||
|
|
||||||
|
void PlaylistListContainer::SetApplication(Application *app) {
|
||||||
|
|
||||||
|
app_ = app;
|
||||||
|
PlaylistManager *manager = app_->playlist_manager();
|
||||||
|
Player *player = app_->player();
|
||||||
|
|
||||||
|
connect(manager, SIGNAL(PlaylistAdded(int, QString, bool)), SLOT(AddPlaylist(int, QString, bool)));
|
||||||
|
connect(manager, SIGNAL(PlaylistFavorited(int, bool)), SLOT(PlaylistFavoriteStateChanged(int, bool)));
|
||||||
|
connect(manager, SIGNAL(PlaylistRenamed(int, QString)), SLOT(PlaylistRenamed(int, QString)));
|
||||||
|
connect(manager, SIGNAL(CurrentChanged(Playlist*)), SLOT(CurrentChanged(Playlist*)));
|
||||||
|
connect(manager, SIGNAL(ActiveChanged(Playlist*)), SLOT(ActiveChanged(Playlist*)));
|
||||||
|
|
||||||
|
connect(model_, SIGNAL(PlaylistRenamed(int, QString)), manager, SLOT(Rename(int, QString)));
|
||||||
|
|
||||||
|
connect(player, SIGNAL(Paused()), SLOT(ActivePaused()));
|
||||||
|
connect(player, SIGNAL(Playing()), SLOT(ActivePlaying()));
|
||||||
|
connect(player, SIGNAL(Stopped()), SLOT(ActiveStopped()));
|
||||||
|
|
||||||
|
// Get all playlists, even ones that are hidden in the UI.
|
||||||
|
for (const PlaylistBackend::Playlist &p : app->playlist_backend()->GetAllFavoritePlaylists()) {
|
||||||
|
QStandardItem *playlist_item = model_->NewPlaylist(p.name, p.id);
|
||||||
|
QStandardItem *parent_folder = model_->FolderByPath(p.ui_path);
|
||||||
|
parent_folder->appendRow(playlist_item);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void PlaylistListContainer::ReloadSettings() {
|
||||||
|
|
||||||
|
QSettings s;
|
||||||
|
s.beginGroup(AppearanceSettingsPage::kSettingsGroup);
|
||||||
|
int iconsize = s.value(AppearanceSettingsPage::kIconSizeLeftPanelButtons, 22).toInt();
|
||||||
|
s.endGroup();
|
||||||
|
|
||||||
|
ui_->new_folder->setIconSize(QSize(iconsize, iconsize));
|
||||||
|
ui_->remove->setIconSize(QSize(iconsize, iconsize));
|
||||||
|
ui_->save_playlist->setIconSize(QSize(iconsize, iconsize));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void PlaylistListContainer::showEvent(QShowEvent *e) {
|
void PlaylistListContainer::showEvent(QShowEvent *e) {
|
||||||
|
|
||||||
// Loading icons is expensive so only do it when the view is first opened
|
// Loading icons is expensive so only do it when the view is first opened
|
||||||
@@ -163,33 +207,6 @@ void PlaylistListContainer::RecursivelySetIcons(QStandardItem *parent) const {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlaylistListContainer::SetApplication(Application *app) {
|
|
||||||
|
|
||||||
app_ = app;
|
|
||||||
PlaylistManager *manager = app_->playlist_manager();
|
|
||||||
Player *player = app_->player();
|
|
||||||
|
|
||||||
connect(manager, SIGNAL(PlaylistAdded(int, QString, bool)), SLOT(AddPlaylist(int, QString, bool)));
|
|
||||||
connect(manager, SIGNAL(PlaylistFavorited(int, bool)), SLOT(PlaylistFavoriteStateChanged(int, bool)));
|
|
||||||
connect(manager, SIGNAL(PlaylistRenamed(int, QString)), SLOT(PlaylistRenamed(int, QString)));
|
|
||||||
connect(manager, SIGNAL(CurrentChanged(Playlist*)), SLOT(CurrentChanged(Playlist*)));
|
|
||||||
connect(manager, SIGNAL(ActiveChanged(Playlist*)), SLOT(ActiveChanged(Playlist*)));
|
|
||||||
|
|
||||||
connect(model_, SIGNAL(PlaylistRenamed(int, QString)), manager, SLOT(Rename(int, QString)));
|
|
||||||
|
|
||||||
connect(player, SIGNAL(Paused()), SLOT(ActivePaused()));
|
|
||||||
connect(player, SIGNAL(Playing()), SLOT(ActivePlaying()));
|
|
||||||
connect(player, SIGNAL(Stopped()), SLOT(ActiveStopped()));
|
|
||||||
|
|
||||||
// Get all playlists, even ones that are hidden in the UI.
|
|
||||||
for (const PlaylistBackend::Playlist &p : app->playlist_backend()->GetAllFavoritePlaylists()) {
|
|
||||||
QStandardItem *playlist_item = model_->NewPlaylist(p.name, p.id);
|
|
||||||
QStandardItem *parent_folder = model_->FolderByPath(p.ui_path);
|
|
||||||
parent_folder->appendRow(playlist_item);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void PlaylistListContainer::NewFolderClicked() {
|
void PlaylistListContainer::NewFolderClicked() {
|
||||||
|
|
||||||
QString name = QInputDialog::getText(this, tr("New folder"), tr("Enter the name of the folder"));
|
QString name = QInputDialog::getText(this, tr("New folder"), tr("Enter the name of the folder"));
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ class PlaylistListContainer : public QWidget {
|
|||||||
~PlaylistListContainer() override;
|
~PlaylistListContainer() override;
|
||||||
|
|
||||||
void SetApplication(Application *app);
|
void SetApplication(Application *app);
|
||||||
|
void ReloadSettings();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void showEvent(QShowEvent *e) override;
|
void showEvent(QShowEvent *e) override;
|
||||||
|
|||||||
@@ -64,6 +64,12 @@
|
|||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>New folder</string>
|
<string>New folder</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>22</width>
|
||||||
|
<height>22</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@@ -71,6 +77,12 @@
|
|||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Delete</string>
|
<string>Delete</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>22</width>
|
||||||
|
<height>22</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@@ -81,7 +93,14 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="save_playlist"/>
|
<widget class="QToolButton" name="save_playlist">
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>22</width>
|
||||||
|
<height>22</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="Line" name="line_2">
|
<widget class="Line" name="line_2">
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
#include <QTreeView>
|
#include <QTreeView>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
#include <QSettings>
|
||||||
#include <QKeySequence>
|
#include <QKeySequence>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QToolButton>
|
#include <QToolButton>
|
||||||
@@ -39,6 +40,7 @@
|
|||||||
#include "queue.h"
|
#include "queue.h"
|
||||||
#include "queueview.h"
|
#include "queueview.h"
|
||||||
#include "ui_queueview.h"
|
#include "ui_queueview.h"
|
||||||
|
#include "settings/appearancesettingspage.h"
|
||||||
|
|
||||||
QueueView::QueueView(QWidget *parent)
|
QueueView::QueueView(QWidget *parent)
|
||||||
: QWidget(parent),
|
: QWidget(parent),
|
||||||
@@ -64,6 +66,8 @@ QueueView::QueueView(QWidget *parent)
|
|||||||
connect(ui_->remove, SIGNAL(clicked()), SLOT(Remove()));
|
connect(ui_->remove, SIGNAL(clicked()), SLOT(Remove()));
|
||||||
connect(ui_->clear, SIGNAL(clicked()), SLOT(Clear()));
|
connect(ui_->clear, SIGNAL(clicked()), SLOT(Clear()));
|
||||||
|
|
||||||
|
ReloadSettings();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QueueView::~QueueView() {
|
QueueView::~QueueView() {
|
||||||
@@ -79,6 +83,20 @@ void QueueView::SetPlaylistManager(PlaylistManager *manager) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QueueView::ReloadSettings() {
|
||||||
|
|
||||||
|
QSettings s;
|
||||||
|
s.beginGroup(AppearanceSettingsPage::kSettingsGroup);
|
||||||
|
int iconsize = s.value(AppearanceSettingsPage::kIconSizeLeftPanelButtons, 22).toInt();
|
||||||
|
s.endGroup();
|
||||||
|
|
||||||
|
ui_->move_down->setIconSize(QSize(iconsize, iconsize));
|
||||||
|
ui_->move_up->setIconSize(QSize(iconsize, iconsize));
|
||||||
|
ui_->remove->setIconSize(QSize(iconsize, iconsize));
|
||||||
|
ui_->clear->setIconSize(QSize(iconsize, iconsize));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void QueueView::CurrentPlaylistChanged(Playlist *playlist) {
|
void QueueView::CurrentPlaylistChanged(Playlist *playlist) {
|
||||||
|
|
||||||
if (current_playlist_) {
|
if (current_playlist_) {
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ class QueueView : public QWidget {
|
|||||||
~QueueView() override;
|
~QueueView() override;
|
||||||
|
|
||||||
void SetPlaylistManager(PlaylistManager *manager);
|
void SetPlaylistManager(PlaylistManager *manager);
|
||||||
|
void ReloadSettings();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void CurrentPlaylistChanged(Playlist *playlist);
|
void CurrentPlaylistChanged(Playlist *playlist);
|
||||||
|
|||||||
@@ -50,8 +50,8 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
<width>16</width>
|
<width>22</width>
|
||||||
<height>16</height>
|
<height>22</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="shortcut">
|
<property name="shortcut">
|
||||||
@@ -69,8 +69,8 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
<width>16</width>
|
<width>22</width>
|
||||||
<height>16</height>
|
<height>22</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="shortcut">
|
<property name="shortcut">
|
||||||
@@ -89,6 +89,12 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>22</width>
|
||||||
|
<height>22</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@@ -101,8 +107,8 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
<width>16</width>
|
<width>22</width>
|
||||||
<height>16</height>
|
<height>22</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="shortcut">
|
<property name="shortcut">
|
||||||
|
|||||||
@@ -75,6 +75,11 @@ const char *AppearanceSettingsPage::kTabBarSystemColor= "tab_system_color";
|
|||||||
const char *AppearanceSettingsPage::kTabBarGradient = "tab_gradient";
|
const char *AppearanceSettingsPage::kTabBarGradient = "tab_gradient";
|
||||||
const char *AppearanceSettingsPage::kTabBarColor = "tab_color";
|
const char *AppearanceSettingsPage::kTabBarColor = "tab_color";
|
||||||
|
|
||||||
|
const char *AppearanceSettingsPage::kIconSizePlayControlButtons = "icon_size_play_control_buttons";
|
||||||
|
const char *AppearanceSettingsPage::kIconSizePlaylistButtons = "icon_size_playlist_buttons";
|
||||||
|
const char *AppearanceSettingsPage::kIconSizeLeftPanelButtons = "icon_size_left_panel_buttons";
|
||||||
|
const char *AppearanceSettingsPage::kIconSizeConfigureButtons = "icon_size_configure_buttons";
|
||||||
|
|
||||||
AppearanceSettingsPage::AppearanceSettingsPage(SettingsDialog *dialog)
|
AppearanceSettingsPage::AppearanceSettingsPage(SettingsDialog *dialog)
|
||||||
: SettingsPage(dialog),
|
: SettingsPage(dialog),
|
||||||
ui_(new Ui_AppearanceSettingsPage),
|
ui_(new Ui_AppearanceSettingsPage),
|
||||||
@@ -186,6 +191,11 @@ void AppearanceSettingsPage::Load() {
|
|||||||
ui_->checkbox_background_image_keep_aspect_ratio->setEnabled(ui_->checkbox_background_image_stretch->isChecked());
|
ui_->checkbox_background_image_keep_aspect_ratio->setEnabled(ui_->checkbox_background_image_stretch->isChecked());
|
||||||
ui_->checkbox_background_image_do_not_cut->setEnabled(ui_->checkbox_background_image_stretch->isChecked() && ui_->checkbox_background_image_keep_aspect_ratio->isChecked());
|
ui_->checkbox_background_image_do_not_cut->setEnabled(ui_->checkbox_background_image_stretch->isChecked() && ui_->checkbox_background_image_keep_aspect_ratio->isChecked());
|
||||||
|
|
||||||
|
ui_->spinbox_icon_size_play_control_buttons->setValue(s.value(kIconSizePlayControlButtons, 32).toInt());
|
||||||
|
ui_->spinbox_icon_size_playlist_buttons->setValue(s.value(kIconSizePlaylistButtons, 20).toInt());
|
||||||
|
ui_->spinbox_icon_size_left_panel_buttons->setValue(s.value(kIconSizeLeftPanelButtons, 22).toInt());
|
||||||
|
ui_->spinbox_icon_size_configure_buttons->setValue(s.value(kIconSizeConfigureButtons, 16).toInt());
|
||||||
|
|
||||||
s.endGroup();
|
s.endGroup();
|
||||||
|
|
||||||
Init(ui_->layout_appearancesettingspage->parentWidget());
|
Init(ui_->layout_appearancesettingspage->parentWidget());
|
||||||
@@ -245,6 +255,11 @@ void AppearanceSettingsPage::Save() {
|
|||||||
s.setValue(kTabBarGradient, ui_->tabbar_gradient->isChecked());
|
s.setValue(kTabBarGradient, ui_->tabbar_gradient->isChecked());
|
||||||
s.setValue(kTabBarColor, current_tabbar_bg_color_);
|
s.setValue(kTabBarColor, current_tabbar_bg_color_);
|
||||||
|
|
||||||
|
s.setValue(kIconSizePlayControlButtons, ui_->spinbox_icon_size_play_control_buttons->value());
|
||||||
|
s.setValue(kIconSizePlaylistButtons, ui_->spinbox_icon_size_playlist_buttons->value());
|
||||||
|
s.setValue(kIconSizeLeftPanelButtons, ui_->spinbox_icon_size_left_panel_buttons->value());
|
||||||
|
s.setValue(kIconSizeConfigureButtons, ui_->spinbox_icon_size_configure_buttons->value());
|
||||||
|
|
||||||
s.endGroup();
|
s.endGroup();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,6 +68,11 @@ class AppearanceSettingsPage : public SettingsPage {
|
|||||||
static const char *kTabBarGradient;
|
static const char *kTabBarGradient;
|
||||||
static const char *kTabBarColor;
|
static const char *kTabBarColor;
|
||||||
|
|
||||||
|
static const char *kIconSizePlayControlButtons;
|
||||||
|
static const char *kIconSizePlaylistButtons;
|
||||||
|
static const char *kIconSizeLeftPanelButtons;
|
||||||
|
static const char *kIconSizeConfigureButtons;
|
||||||
|
|
||||||
enum BackgroundImageType {
|
enum BackgroundImageType {
|
||||||
BackgroundImageType_Default,
|
BackgroundImageType_Default,
|
||||||
BackgroundImageType_None,
|
BackgroundImageType_None,
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>674</width>
|
<width>674</width>
|
||||||
<height>755</height>
|
<height>865</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@@ -427,6 +427,100 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupbox_icon_sizes">
|
||||||
|
<property name="title">
|
||||||
|
<string>Icon sizes</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="layout_groupbox_icon_sizes">
|
||||||
|
<item>
|
||||||
|
<layout class="QGridLayout" name="layout_icon_sizes">
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_icon_size_left_panel_buttons">
|
||||||
|
<property name="text">
|
||||||
|
<string>Files, playlists and queue buttons</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_icon_size_playlist_buttons">
|
||||||
|
<property name="text">
|
||||||
|
<string>Playlist buttons</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label_icon_size_play_control_buttons">
|
||||||
|
<property name="text">
|
||||||
|
<string>Play control buttons</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinbox_icon_size_left_panel_buttons">
|
||||||
|
<property name="minimum">
|
||||||
|
<number>16</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>64</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinbox_icon_size_play_control_buttons">
|
||||||
|
<property name="minimum">
|
||||||
|
<number>16</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>64</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinbox_icon_size_playlist_buttons">
|
||||||
|
<property name="minimum">
|
||||||
|
<number>16</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>64</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="label_icon_size_configure_buttons">
|
||||||
|
<property name="text">
|
||||||
|
<string>Configure buttons</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinbox_icon_size_configure_buttons">
|
||||||
|
<property name="minimum">
|
||||||
|
<number>16</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>64</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="spacer_icon_sizes">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="checkbox_system_icons">
|
<widget class="QCheckBox" name="checkbox_system_icons">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
#include <QSettings>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QScrollBar>
|
#include <QScrollBar>
|
||||||
#include <QLineEdit>
|
#include <QLineEdit>
|
||||||
@@ -44,6 +45,7 @@
|
|||||||
#ifdef HAVE_GSTREAMER
|
#ifdef HAVE_GSTREAMER
|
||||||
# include "organise/organiseerrordialog.h"
|
# include "organise/organiseerrordialog.h"
|
||||||
#endif
|
#endif
|
||||||
|
#include "settings/appearancesettingspage.h"
|
||||||
|
|
||||||
const char *FileView::kFileFilter =
|
const char *FileView::kFileFilter =
|
||||||
"*.wav *.flac *.wv *.ogg *.oga *.opus *.spx *.ape *.mpc "
|
"*.wav *.flac *.wv *.ogg *.oga *.opus *.spx *.ape *.mpc "
|
||||||
@@ -91,12 +93,28 @@ FileView::FileView(QWidget *parent)
|
|||||||
QString filter(FileView::kFileFilter);
|
QString filter(FileView::kFileFilter);
|
||||||
filter_list_ << filter.split(" ");
|
filter_list_ << filter.split(" ");
|
||||||
|
|
||||||
|
ReloadSettings();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FileView::~FileView() {
|
FileView::~FileView() {
|
||||||
delete ui_;
|
delete ui_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FileView::ReloadSettings() {
|
||||||
|
|
||||||
|
QSettings s;
|
||||||
|
s.beginGroup(AppearanceSettingsPage::kSettingsGroup);
|
||||||
|
int iconsize = s.value(AppearanceSettingsPage::kIconSizeLeftPanelButtons, 22).toInt();
|
||||||
|
s.endGroup();
|
||||||
|
|
||||||
|
ui_->back->setIconSize(QSize(iconsize, iconsize));
|
||||||
|
ui_->forward->setIconSize(QSize(iconsize, iconsize));
|
||||||
|
ui_->home->setIconSize(QSize(iconsize, iconsize));
|
||||||
|
ui_->up->setIconSize(QSize(iconsize, iconsize));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void FileView::SetPath(const QString &path) {
|
void FileView::SetPath(const QString &path) {
|
||||||
if (!model_)
|
if (!model_)
|
||||||
lazy_set_path_ = path;
|
lazy_set_path_ = path;
|
||||||
|
|||||||
@@ -55,6 +55,8 @@ class FileView : public QWidget {
|
|||||||
|
|
||||||
static const char *kFileFilter;
|
static const char *kFileFilter;
|
||||||
|
|
||||||
|
void ReloadSettings();
|
||||||
|
|
||||||
void SetPath(const QString &path);
|
void SetPath(const QString &path);
|
||||||
void SetTaskManager(TaskManager *task_manager);
|
void SetTaskManager(TaskManager *task_manager);
|
||||||
|
|
||||||
|
|||||||
@@ -41,8 +41,8 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
<width>16</width>
|
<width>22</width>
|
||||||
<height>16</height>
|
<height>22</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="autoRaise">
|
<property name="autoRaise">
|
||||||
@@ -57,8 +57,8 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
<width>16</width>
|
<width>22</width>
|
||||||
<height>16</height>
|
<height>22</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="autoRaise">
|
<property name="autoRaise">
|
||||||
@@ -70,8 +70,8 @@
|
|||||||
<widget class="QToolButton" name="up">
|
<widget class="QToolButton" name="up">
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
<width>16</width>
|
<width>22</width>
|
||||||
<height>16</height>
|
<height>22</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="autoRaise">
|
<property name="autoRaise">
|
||||||
@@ -83,8 +83,8 @@
|
|||||||
<widget class="QToolButton" name="home">
|
<widget class="QToolButton" name="home">
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
<width>16</width>
|
<width>22</width>
|
||||||
<height>16</height>
|
<height>22</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="autoRaise">
|
<property name="autoRaise">
|
||||||
|
|||||||
Reference in New Issue
Block a user