Make icon sizes configurable, increase default sizes for icons
Fixes #250
This commit is contained in:
@@ -102,7 +102,11 @@ void InternetCollectionView::SetFilter(CollectionFilterWidget *filter) {
|
||||
|
||||
}
|
||||
|
||||
void InternetCollectionView::ReloadSettings() {}
|
||||
void InternetCollectionView::ReloadSettings() {
|
||||
|
||||
if (filter_) filter_->ReloadSettings();
|
||||
|
||||
}
|
||||
|
||||
void InternetCollectionView::SaveFocus() {
|
||||
|
||||
|
||||
@@ -51,4 +51,9 @@ InternetCollectionViewContainer::InternetCollectionViewContainer(QWidget *parent
|
||||
|
||||
InternetCollectionViewContainer::~InternetCollectionViewContainer() { delete ui_; }
|
||||
|
||||
void InternetCollectionViewContainer::ReloadSettings() {
|
||||
filter()->ReloadSettings();
|
||||
view()->ReloadSettings();
|
||||
}
|
||||
|
||||
void InternetCollectionViewContainer::contextMenuEvent(QContextMenuEvent *e) { Q_UNUSED(e); }
|
||||
|
||||
@@ -45,6 +45,8 @@ class InternetCollectionViewContainer : public QWidget {
|
||||
explicit InternetCollectionViewContainer(QWidget *parent = nullptr);
|
||||
~InternetCollectionViewContainer() override;
|
||||
|
||||
void ReloadSettings();
|
||||
|
||||
QStackedWidget *stacked() const { return ui_->stacked; }
|
||||
QWidget *help_page() const { return ui_->help_page; }
|
||||
QWidget *internetcollection_page() const { return ui_->internetcollection_page; }
|
||||
@@ -55,7 +57,6 @@ class InternetCollectionViewContainer : public QWidget {
|
||||
QPushButton *button_abort() const { return ui_->abort; }
|
||||
QLabel *status() const { return ui_->status; }
|
||||
QProgressBar *progressbar() const { return ui_->progressbar; }
|
||||
void ReloadSettings() { view()->ReloadSettings(); }
|
||||
|
||||
private slots:
|
||||
void contextMenuEvent(QContextMenuEvent *e) override;
|
||||
|
||||
@@ -85,6 +85,7 @@
|
||||
#include "internetsearchsortmodel.h"
|
||||
#include "internetsearchview.h"
|
||||
#include "ui_internetsearchview.h"
|
||||
#include "settings/appearancesettingspage.h"
|
||||
|
||||
using std::placeholders::_1;
|
||||
using std::placeholders::_2;
|
||||
@@ -245,6 +246,11 @@ void InternetSearchView::ReloadSettings() {
|
||||
CollectionModel::GroupBy(s.value("search_group_by3", int(CollectionModel::GroupBy_None)).toInt())));
|
||||
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) {
|
||||
|
||||
@@ -54,6 +54,12 @@
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="popupMode">
|
||||
<enum>QToolButton::InstantPopup</enum>
|
||||
</property>
|
||||
@@ -225,7 +231,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>398</width>
|
||||
<height>528</height>
|
||||
<height>527</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
|
||||
@@ -85,7 +85,12 @@ InternetSongsView::InternetSongsView(Application *app, InternetService *service,
|
||||
|
||||
InternetSongsView::~InternetSongsView() { delete ui_; }
|
||||
|
||||
void InternetSongsView::ReloadSettings() {}
|
||||
void InternetSongsView::ReloadSettings() {
|
||||
|
||||
ui_->filter->ReloadSettings();
|
||||
ui_->view->ReloadSettings();
|
||||
|
||||
}
|
||||
|
||||
void InternetSongsView::OpenSettingsDialog() {
|
||||
app_->OpenSettingsDialogAtPage(service_->settings_page());
|
||||
|
||||
@@ -191,7 +191,20 @@ InternetTabsView::~InternetTabsView() {
|
||||
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() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user