Qt: remove gamelist toolbar
@ -244,9 +244,6 @@ QToolButton::hover {
|
|||||||
QLabel#gamelist_icon_background_color {
|
QLabel#gamelist_icon_background_color {
|
||||||
color: transparent;
|
color: transparent;
|
||||||
}
|
}
|
||||||
QLabel#gamelist_toolbar_icon_color {
|
|
||||||
color: #828790;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set Windows Taskbar Thumbnail colors */
|
/* Set Windows Taskbar Thumbnail colors */
|
||||||
QLabel#thumbnail_icon_color {
|
QLabel#thumbnail_icon_color {
|
||||||
|
@ -243,9 +243,6 @@ QToolButton::hover {
|
|||||||
QLabel#gamelist_icon_background_color {
|
QLabel#gamelist_icon_background_color {
|
||||||
color: transparent;
|
color: transparent;
|
||||||
}
|
}
|
||||||
QLabel#gamelist_toolbar_icon_color {
|
|
||||||
color: #828790;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set Windows Taskbar Thumbnail colors */
|
/* Set Windows Taskbar Thumbnail colors */
|
||||||
QLabel#thumbnail_icon_color {
|
QLabel#thumbnail_icon_color {
|
||||||
|
@ -241,9 +241,6 @@ QToolButton::hover {
|
|||||||
QLabel#gamelist_icon_background_color {
|
QLabel#gamelist_icon_background_color {
|
||||||
color: transparent;
|
color: transparent;
|
||||||
}
|
}
|
||||||
QLabel#gamelist_toolbar_icon_color {
|
|
||||||
color: #828790;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set Windows Taskbar Thumbnail colors */
|
/* Set Windows Taskbar Thumbnail colors */
|
||||||
QLabel#thumbnail_icon_color {
|
QLabel#thumbnail_icon_color {
|
||||||
|
Before Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 8.0 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 5.8 KiB |
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 14 KiB |
@ -5,22 +5,6 @@
|
|||||||
<file>Icons/restart.png</file>
|
<file>Icons/restart.png</file>
|
||||||
<file>Icons/stop.png</file>
|
<file>Icons/stop.png</file>
|
||||||
<file>rpcs3.ico</file>
|
<file>rpcs3.ico</file>
|
||||||
<file>Icons/data_blue.png</file>
|
|
||||||
<file>Icons/data_gray.png</file>
|
|
||||||
<file>Icons/disc_blue.png</file>
|
|
||||||
<file>Icons/disc_gray.png</file>
|
|
||||||
<file>Icons/grid_blue.png</file>
|
|
||||||
<file>Icons/grid_gray.png</file>
|
|
||||||
<file>Icons/hdd_blue.png</file>
|
|
||||||
<file>Icons/hdd_gray.png</file>
|
|
||||||
<file>Icons/home_blue.png</file>
|
|
||||||
<file>Icons/home_gray.png</file>
|
|
||||||
<file>Icons/list_blue.png</file>
|
|
||||||
<file>Icons/list_gray.png</file>
|
|
||||||
<file>Icons/media_blue.png</file>
|
|
||||||
<file>Icons/media_gray.png</file>
|
|
||||||
<file>Icons/unknown_blue.png</file>
|
|
||||||
<file>Icons/unknown_gray.png</file>
|
|
||||||
<file>Icons/controller.png</file>
|
<file>Icons/controller.png</file>
|
||||||
<file>Icons/insignia.png</file>
|
<file>Icons/insignia.png</file>
|
||||||
<file>Icons/configure.png</file>
|
<file>Icons/configure.png</file>
|
||||||
@ -37,8 +21,6 @@
|
|||||||
<file>Icons/sort.png</file>
|
<file>Icons/sort.png</file>
|
||||||
<file>Icons/fullscreen_invert.png</file>
|
<file>Icons/fullscreen_invert.png</file>
|
||||||
<file>Json/tooltips.json</file>
|
<file>Json/tooltips.json</file>
|
||||||
<file>Icons/other_blue.png</file>
|
|
||||||
<file>Icons/other_gray.png</file>
|
|
||||||
<file>Icons/pause_blue.png</file>
|
<file>Icons/pause_blue.png</file>
|
||||||
<file>Icons/play_blue.png</file>
|
<file>Icons/play_blue.png</file>
|
||||||
<file>Icons/restart_blue.png</file>
|
<file>Icons/restart_blue.png</file>
|
||||||
|
@ -313,13 +313,6 @@ void rpcs3_app::OnChangeStyleSheetRequest(const QString& sheetFilePath)
|
|||||||
"QLabel#thumbnail_icon_color { color: " + rgba(gui::mw_thumb_icon_color) + " }"
|
"QLabel#thumbnail_icon_color { color: " + rgba(gui::mw_thumb_icon_color) + " }"
|
||||||
);
|
);
|
||||||
|
|
||||||
// gamelist toolbar stylesheet
|
|
||||||
QString style_gamelist_toolbar = QString
|
|
||||||
(
|
|
||||||
"QLineEdit#tb_searchbar { background: transparent; }"
|
|
||||||
"QLabel#gamelist_toolbar_icon_color { color: " + rgba(gui::gl_tool_icon_color) + " }"
|
|
||||||
);
|
|
||||||
|
|
||||||
// gamelist icon color stylesheet
|
// gamelist icon color stylesheet
|
||||||
QString style_gamelist_icons = QString
|
QString style_gamelist_icons = QString
|
||||||
(
|
(
|
||||||
@ -359,7 +352,7 @@ void rpcs3_app::OnChangeStyleSheetRequest(const QString& sheetFilePath)
|
|||||||
"QLabel#gamegrid_font { font-weight: 600; font-size: 8pt; font-family: Lucida Grande; color: rgba(51, 51, 51, 255); }"
|
"QLabel#gamegrid_font { font-weight: 600; font-size: 8pt; font-family: Lucida Grande; color: rgba(51, 51, 51, 255); }"
|
||||||
);
|
);
|
||||||
|
|
||||||
setStyleSheet(style_toolbar + style_toolbar_icons + style_thumbnail_icons + style_gamelist_toolbar + style_gamelist_icons + style_log + style_rest);
|
setStyleSheet(style_toolbar + style_toolbar_icons + style_thumbnail_icons + style_gamelist_icons + style_log + style_rest);
|
||||||
}
|
}
|
||||||
else if (file.open(QIODevice::ReadOnly | QIODevice::Text))
|
else if (file.open(QIODevice::ReadOnly | QIODevice::Text))
|
||||||
{
|
{
|
||||||
|
@ -30,7 +30,6 @@ game_list_frame::game_list_frame(std::shared_ptr<gui_settings> guiSettings, std:
|
|||||||
m_icon_size_index = xgui_settings->GetValue(gui::gl_iconSize).toInt();
|
m_icon_size_index = xgui_settings->GetValue(gui::gl_iconSize).toInt();
|
||||||
m_Margin_Factor = xgui_settings->GetValue(gui::gl_marginFactor).toReal();
|
m_Margin_Factor = xgui_settings->GetValue(gui::gl_marginFactor).toReal();
|
||||||
m_Text_Factor = xgui_settings->GetValue(gui::gl_textFactor).toReal();
|
m_Text_Factor = xgui_settings->GetValue(gui::gl_textFactor).toReal();
|
||||||
m_showToolBar = xgui_settings->GetValue(gui::gl_toolBarVisible).toBool();
|
|
||||||
m_Icon_Color = xgui_settings->GetValue(gui::gl_iconColor).value<QColor>();
|
m_Icon_Color = xgui_settings->GetValue(gui::gl_iconColor).value<QColor>();
|
||||||
m_colSortOrder = xgui_settings->GetValue(gui::gl_sortAsc).toBool() ? Qt::AscendingOrder : Qt::DescendingOrder;
|
m_colSortOrder = xgui_settings->GetValue(gui::gl_sortAsc).toBool() ? Qt::AscendingOrder : Qt::DescendingOrder;
|
||||||
m_sortColumn = xgui_settings->GetValue(gui::gl_sortCol).toInt();
|
m_sortColumn = xgui_settings->GetValue(gui::gl_sortCol).toInt();
|
||||||
@ -41,95 +40,11 @@ game_list_frame::game_list_frame(std::shared_ptr<gui_settings> guiSettings, std:
|
|||||||
xgui_settings->SetValue(gui::gl_iconColor, m_Icon_Color);
|
xgui_settings->SetValue(gui::gl_iconColor, m_Icon_Color);
|
||||||
xgui_settings->SetValue(gui::gl_marginFactor, m_Margin_Factor);
|
xgui_settings->SetValue(gui::gl_marginFactor, m_Margin_Factor);
|
||||||
xgui_settings->SetValue(gui::gl_textFactor, m_Text_Factor);
|
xgui_settings->SetValue(gui::gl_textFactor, m_Text_Factor);
|
||||||
xgui_settings->SetValue(gui::gl_toolBarVisible, m_showToolBar);
|
|
||||||
|
|
||||||
m_Game_Dock = new QMainWindow(this);
|
m_Game_Dock = new QMainWindow(this);
|
||||||
m_Game_Dock->setWindowFlags(Qt::Widget);
|
m_Game_Dock->setWindowFlags(Qt::Widget);
|
||||||
|
|
||||||
// Set up toolbar
|
|
||||||
m_Tool_Bar = new QToolBar(m_Game_Dock);
|
|
||||||
m_Tool_Bar->setMovable(false);
|
|
||||||
m_Tool_Bar->setVisible(m_showToolBar);
|
|
||||||
m_Tool_Bar->setContextMenuPolicy(Qt::PreventContextMenu);
|
|
||||||
|
|
||||||
// ToolBar Actions
|
|
||||||
m_catActHDD = { new QAction(""), QIcon(":/Icons/hdd_blue.png"), QIcon(":/Icons/hdd_gray.png"), xgui_settings->GetValue(gui::cat_hdd_game).toBool() };
|
|
||||||
m_catActHDD.action->setToolTip(tr("Show HDD Categories"));
|
|
||||||
|
|
||||||
m_catActDisc = { new QAction(""), QIcon(":/Icons/disc_blue.png"), QIcon(":/Icons/disc_gray.png"), xgui_settings->GetValue(gui::cat_disc_game).toBool() };
|
|
||||||
m_catActDisc.action->setToolTip(tr("Show Disc Categories"));
|
|
||||||
|
|
||||||
m_catActHome = { new QAction(""), QIcon(":/Icons/home_blue.png"), QIcon(":/Icons/home_gray.png"), xgui_settings->GetValue(gui::cat_home).toBool() };
|
|
||||||
m_catActHome.action->setToolTip(tr("Show Home Categories"));
|
|
||||||
|
|
||||||
m_catActAudioVideo = { new QAction(""), QIcon(":/Icons/media_blue.png"), QIcon(":/Icons/media_gray.png"), xgui_settings->GetValue(gui::cat_audio_video).toBool() };
|
|
||||||
m_catActAudioVideo.action->setToolTip(tr("Show Audio/Video Categories"));
|
|
||||||
|
|
||||||
m_catActGameData = { new QAction(""), QIcon(":/Icons/data_blue.png"), QIcon(":/Icons/data_gray.png"), xgui_settings->GetValue(gui::cat_game_data).toBool() };
|
|
||||||
m_catActGameData.action->setToolTip(tr("Show GameData Categories"));
|
|
||||||
|
|
||||||
m_catActUnknown = { new QAction(""), QIcon(":/Icons/unknown_blue.png"), QIcon(":/Icons/unknown_gray.png"), xgui_settings->GetValue(gui::cat_unknown).toBool() };
|
|
||||||
m_catActUnknown.action->setToolTip(tr("Show Unknown Categories"));
|
|
||||||
|
|
||||||
m_catActOther = { new QAction(""), QIcon(":/Icons/other_blue.png"), QIcon(":/Icons/other_gray.png"), xgui_settings->GetValue(gui::cat_other).toBool() };
|
|
||||||
m_catActOther.action->setToolTip(tr("Show Other Categories"));
|
|
||||||
|
|
||||||
m_categoryButtons = { &m_catActHDD , &m_catActDisc, &m_catActHome, &m_catActAudioVideo, &m_catActGameData, &m_catActUnknown, &m_catActOther };
|
|
||||||
|
|
||||||
m_categoryActs = new QActionGroup(m_Tool_Bar);
|
|
||||||
m_categoryActs->addAction(m_catActHDD.action);
|
|
||||||
m_categoryActs->addAction(m_catActDisc.action);
|
|
||||||
m_categoryActs->addAction(m_catActHome.action);
|
|
||||||
m_categoryActs->addAction(m_catActAudioVideo.action);
|
|
||||||
m_categoryActs->addAction(m_catActGameData.action);
|
|
||||||
m_categoryActs->addAction(m_catActUnknown.action);
|
|
||||||
m_categoryActs->addAction(m_catActOther.action);
|
|
||||||
m_categoryActs->setEnabled(m_isListLayout);
|
|
||||||
|
|
||||||
m_modeActList = { new QAction(""), QIcon(":/Icons/list_blue.png"), QIcon(":/Icons/list_gray.png") };
|
|
||||||
m_modeActList.action->setToolTip(tr("Enable List Mode"));
|
|
||||||
|
|
||||||
m_modeActGrid = { new QAction(""), QIcon(":/Icons/grid_blue.png"), QIcon(":/Icons/grid_gray.png") };
|
|
||||||
m_modeActGrid.action->setToolTip(tr("Enable Grid Mode"));
|
|
||||||
|
|
||||||
m_modeActs = new QActionGroup(m_Tool_Bar);
|
|
||||||
m_modeActs->addAction(m_modeActList.action);
|
|
||||||
m_modeActs->addAction(m_modeActGrid.action);
|
|
||||||
|
|
||||||
// Search Bar
|
|
||||||
m_Search_Bar = new QLineEdit(m_Tool_Bar);
|
|
||||||
m_Search_Bar->setObjectName("tb_searchbar"); // used in default stylesheet
|
|
||||||
m_Search_Bar->setPlaceholderText(tr("Search games ..."));
|
|
||||||
m_Search_Bar->setMinimumWidth(m_Tool_Bar->height() * 5);
|
|
||||||
m_Search_Bar->setFrame(false);
|
|
||||||
|
|
||||||
// Icon Size Slider
|
|
||||||
m_Slider_Size = new QSlider(Qt::Horizontal , m_Tool_Bar);
|
|
||||||
m_Slider_Size->setRange(0, gui::gl_max_slider_pos);
|
|
||||||
m_Slider_Size->setSliderPosition(m_icon_size_index);
|
|
||||||
m_Slider_Size->setFixedWidth(m_Tool_Bar->height() * 3);
|
|
||||||
|
|
||||||
m_Tool_Bar->addWidget(m_Search_Bar);
|
|
||||||
m_Tool_Bar->addWidget(new QLabel(" "));
|
|
||||||
m_Tool_Bar->addSeparator();
|
|
||||||
m_Tool_Bar->addWidget(new QLabel(" "));
|
|
||||||
m_Tool_Bar->addActions(m_categoryActs->actions());
|
|
||||||
m_Tool_Bar->addWidget(new QLabel(" "));
|
|
||||||
m_Tool_Bar->addSeparator();
|
|
||||||
m_Tool_Bar->addWidget(new QLabel(tr(" View Mode ")));
|
|
||||||
m_Tool_Bar->addAction(m_modeActList.action);
|
|
||||||
m_Tool_Bar->addAction(m_modeActGrid.action);
|
|
||||||
m_Tool_Bar->addWidget(new QLabel(tr(" ")));
|
|
||||||
m_Tool_Bar->addSeparator();
|
|
||||||
m_Tool_Bar->addWidget(new QLabel(tr(" Tiny "))); // Can this be any easier?
|
|
||||||
m_Tool_Bar->addWidget(m_Slider_Size);
|
|
||||||
m_Tool_Bar->addWidget(new QLabel(tr(" Large ")));
|
|
||||||
|
|
||||||
m_Game_Dock->addToolBar(m_Tool_Bar);
|
|
||||||
setWidget(m_Game_Dock);
|
setWidget(m_Game_Dock);
|
||||||
|
|
||||||
RepaintToolBarIcons();
|
|
||||||
|
|
||||||
bool showText = m_icon_size_index < gui::gl_max_slider_pos;
|
bool showText = m_icon_size_index < gui::gl_max_slider_pos;
|
||||||
m_Icon_Size = sizeFromSlider(m_icon_size_index);
|
m_Icon_Size = sizeFromSlider(m_icon_size_index);
|
||||||
m_xgrid = new game_list_grid(m_Icon_Size, m_Icon_Color, m_Margin_Factor, m_Text_Factor, showText);
|
m_xgrid = new game_list_grid(m_Icon_Size, m_Icon_Color, m_Margin_Factor, m_Text_Factor, showText);
|
||||||
@ -242,33 +157,6 @@ game_list_frame::game_list_frame(std::shared_ptr<gui_settings> guiSettings, std:
|
|||||||
QMessageBox::warning(this, tr("Warning!"), tr("Failed to retrieve the online compatibility database!\nFalling back to local database.\n\n") + tr(qPrintable(error)));
|
QMessageBox::warning(this, tr("Warning!"), tr("Failed to retrieve the online compatibility database!\nFalling back to local database.\n\n") + tr(qPrintable(error)));
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(m_Search_Bar, &QLineEdit::textChanged, this, &game_list_frame::SetSearchText);
|
|
||||||
|
|
||||||
connect(m_Slider_Size, &QSlider::valueChanged, this, &game_list_frame::RequestIconSizeActSet);
|
|
||||||
connect(m_Slider_Size, &QSlider::sliderReleased, this, [&]
|
|
||||||
{
|
|
||||||
xgui_settings->SetValue(gui::gl_iconSize, m_Slider_Size->value());
|
|
||||||
});
|
|
||||||
connect(m_Slider_Size, &QSlider::actionTriggered, [&](int action)
|
|
||||||
{
|
|
||||||
if (action != QAbstractSlider::SliderNoAction && action != QAbstractSlider::SliderMove)
|
|
||||||
{ // we only want to save on mouseclicks or slider release (the other connect handles this)
|
|
||||||
Q_EMIT RequestSaveSliderPos(true); // actionTriggered happens before the value was changed
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
connect(m_modeActs, &QActionGroup::triggered, [=](QAction* act)
|
|
||||||
{
|
|
||||||
Q_EMIT RequestListModeActSet(act == m_modeActList.action);
|
|
||||||
m_modeActList.action->setIcon(m_isListLayout ? m_modeActList.colored : m_modeActList.gray);
|
|
||||||
m_modeActGrid.action->setIcon(m_isListLayout ? m_modeActGrid.gray : m_modeActGrid.colored);
|
|
||||||
});
|
|
||||||
|
|
||||||
connect(m_categoryActs, &QActionGroup::triggered, [=](QAction* act)
|
|
||||||
{
|
|
||||||
Q_EMIT RequestCategoryActSet(m_categoryActs->actions().indexOf(act));
|
|
||||||
});
|
|
||||||
|
|
||||||
for (int col = 0; col < m_columnActs.count(); ++col)
|
for (int col = 0; col < m_columnActs.count(); ++col)
|
||||||
{
|
{
|
||||||
m_columnActs[col]->setCheckable(true);
|
m_columnActs[col]->setCheckable(true);
|
||||||
@ -885,11 +773,6 @@ void game_list_frame::ResizeIcons(const int& sliderPos)
|
|||||||
m_icon_size_index = sliderPos;
|
m_icon_size_index = sliderPos;
|
||||||
m_Icon_Size = sizeFromSlider(sliderPos);
|
m_Icon_Size = sizeFromSlider(sliderPos);
|
||||||
|
|
||||||
if (m_Slider_Size->value() != sliderPos)
|
|
||||||
{
|
|
||||||
m_Slider_Size->setSliderPosition(sliderPos);
|
|
||||||
}
|
|
||||||
|
|
||||||
RepaintIcons();
|
RepaintIcons();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -915,11 +798,6 @@ void game_list_frame::RepaintIcons(const bool& fromSettings)
|
|||||||
Refresh();
|
Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
int game_list_frame::GetSliderValue()
|
|
||||||
{
|
|
||||||
return m_Slider_Size->value();
|
|
||||||
}
|
|
||||||
|
|
||||||
void game_list_frame::SetListMode(const bool& isList)
|
void game_list_frame::SetListMode(const bool& isList)
|
||||||
{
|
{
|
||||||
m_oldLayoutIsList = m_isListLayout;
|
m_oldLayoutIsList = m_isListLayout;
|
||||||
@ -927,80 +805,17 @@ void game_list_frame::SetListMode(const bool& isList)
|
|||||||
|
|
||||||
xgui_settings->SetValue(gui::gl_listMode, isList);
|
xgui_settings->SetValue(gui::gl_listMode, isList);
|
||||||
|
|
||||||
m_categoryActs->setEnabled(isList);
|
|
||||||
m_modeActList.action->setIcon(m_isListLayout ? m_modeActList.colored : m_modeActList.gray);
|
|
||||||
m_modeActGrid.action->setIcon(m_isListLayout ? m_modeActGrid.gray : m_modeActGrid.colored);
|
|
||||||
|
|
||||||
Refresh(true);
|
Refresh(true);
|
||||||
|
|
||||||
m_Central_Widget->setCurrentWidget(m_isListLayout ? m_gameList : m_xgrid);
|
m_Central_Widget->setCurrentWidget(m_isListLayout ? m_gameList : m_xgrid);
|
||||||
}
|
}
|
||||||
|
|
||||||
void game_list_frame::SetToolBarVisible(const bool& showToolBar)
|
|
||||||
{
|
|
||||||
m_showToolBar = showToolBar;
|
|
||||||
m_Tool_Bar->setVisible(showToolBar);
|
|
||||||
xgui_settings->SetValue(gui::gl_toolBarVisible, showToolBar);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool game_list_frame::GetToolBarVisible()
|
|
||||||
{
|
|
||||||
return m_showToolBar;
|
|
||||||
}
|
|
||||||
|
|
||||||
void game_list_frame::SetCategoryActIcon(const int& id, const bool& active)
|
|
||||||
{
|
|
||||||
m_categoryButtons.at(id)->action->setIcon(active ? m_categoryButtons.at(id)->colored : m_categoryButtons.at(id)->gray);
|
|
||||||
m_categoryButtons.at(id)->isActive = active;
|
|
||||||
}
|
|
||||||
|
|
||||||
void game_list_frame::SetSearchText(const QString& text)
|
void game_list_frame::SetSearchText(const QString& text)
|
||||||
{
|
{
|
||||||
m_searchText = text;
|
m_search_text = text;
|
||||||
Refresh();
|
Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
void game_list_frame::RepaintToolBarIcons()
|
|
||||||
{
|
|
||||||
QColor newColor;
|
|
||||||
|
|
||||||
if (xgui_settings->GetValue(gui::m_enableUIColors).toBool())
|
|
||||||
{
|
|
||||||
newColor = xgui_settings->GetValue(gui::gl_toolIconColor).value<QColor>();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
newColor = gui::get_Label_Color("gamelist_toolbar_icon_color");
|
|
||||||
}
|
|
||||||
|
|
||||||
auto icon = [&newColor](const QString& path, bool mask = false)
|
|
||||||
{
|
|
||||||
return gui_settings::colorizedIcon(QIcon(path), gui::gl_tool_icon_color, newColor, mask);
|
|
||||||
};
|
|
||||||
|
|
||||||
m_catActHDD.colored = icon(":/Icons/hdd_blue.png", true);
|
|
||||||
m_catActDisc.colored = icon(":/Icons/disc_blue.png", true);
|
|
||||||
m_catActHome.colored = icon(":/Icons/home_blue.png");
|
|
||||||
m_catActAudioVideo.colored = icon(":/Icons/media_blue.png", true);
|
|
||||||
m_catActGameData.colored = icon(":/Icons/data_blue.png", true);
|
|
||||||
m_catActUnknown.colored = icon(":/Icons/unknown_blue.png", true);
|
|
||||||
m_catActOther.colored = icon(":/Icons/other_blue.png");
|
|
||||||
|
|
||||||
for (const auto& butt : m_categoryButtons)
|
|
||||||
{
|
|
||||||
butt->action->setIcon(butt->isActive ? butt->colored : butt->gray);
|
|
||||||
}
|
|
||||||
|
|
||||||
m_modeActList.colored = icon(":/Icons/list_blue.png");
|
|
||||||
m_modeActList.action->setIcon(m_isListLayout ? m_modeActList.colored : m_modeActList.gray);
|
|
||||||
|
|
||||||
m_modeActGrid.colored = icon(":/Icons/grid_blue.png");
|
|
||||||
m_modeActGrid.action->setIcon(m_isListLayout ? m_modeActGrid.gray : m_modeActGrid.colored);
|
|
||||||
|
|
||||||
m_Slider_Size->setStyleSheet(m_Slider_Size->styleSheet().append("QSlider::handle:horizontal{ background: rgba(%1, %2, %3, %4); }")
|
|
||||||
.arg(newColor.red()).arg(newColor.green()).arg(newColor.blue()).arg(newColor.alpha()));
|
|
||||||
}
|
|
||||||
|
|
||||||
void game_list_frame::closeEvent(QCloseEvent *event)
|
void game_list_frame::closeEvent(QCloseEvent *event)
|
||||||
{
|
{
|
||||||
QDockWidget::closeEvent(event);
|
QDockWidget::closeEvent(event);
|
||||||
@ -1027,8 +842,7 @@ bool game_list_frame::eventFilter(QObject *object, QEvent *event)
|
|||||||
{
|
{
|
||||||
QPoint numSteps = wheelEvent->angleDelta() / 8 / 15; // http://doc.qt.io/qt-5/qwheelevent.html#pixelDelta
|
QPoint numSteps = wheelEvent->angleDelta() / 8 / 15; // http://doc.qt.io/qt-5/qwheelevent.html#pixelDelta
|
||||||
const int value = numSteps.y();
|
const int value = numSteps.y();
|
||||||
Q_EMIT RequestSaveSliderPos(true);
|
Q_EMIT RequestIconSizeChange(value);
|
||||||
m_Slider_Size->setValue(m_Slider_Size->value() + value);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1040,14 +854,12 @@ bool game_list_frame::eventFilter(QObject *object, QEvent *event)
|
|||||||
{
|
{
|
||||||
if (keyEvent->key() == Qt::Key_Plus)
|
if (keyEvent->key() == Qt::Key_Plus)
|
||||||
{
|
{
|
||||||
Q_EMIT RequestSaveSliderPos(true);
|
Q_EMIT RequestIconSizeChange(1);
|
||||||
m_Slider_Size->setValue(m_Slider_Size->value() + 1);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (keyEvent->key() == Qt::Key_Minus)
|
else if (keyEvent->key() == Qt::Key_Minus)
|
||||||
{
|
{
|
||||||
Q_EMIT RequestSaveSliderPos(true);
|
Q_EMIT RequestIconSizeChange(-1);
|
||||||
m_Slider_Size->setValue(m_Slider_Size->value() - 1);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1227,9 +1039,9 @@ void game_list_frame::PopulateGameGrid(int maxCols, const QSize& image_size, con
|
|||||||
*/
|
*/
|
||||||
bool game_list_frame::SearchMatchesApp(const std::string& name, const std::string& serial)
|
bool game_list_frame::SearchMatchesApp(const std::string& name, const std::string& serial)
|
||||||
{
|
{
|
||||||
if (!m_searchText.isEmpty())
|
if (!m_search_text.isEmpty())
|
||||||
{
|
{
|
||||||
QString searchText = m_searchText.toLower();
|
QString searchText = m_search_text.toLower();
|
||||||
return qstr(name).toLower().contains(searchText) || qstr(serial).toLower().contains(searchText);
|
return qstr(name).toLower().contains(searchText) || qstr(serial).toLower().contains(searchText);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -170,14 +170,6 @@ struct GUI_GameInfo
|
|||||||
bool hasCustomConfig;
|
bool hasCustomConfig;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Tool_Bar_Button
|
|
||||||
{
|
|
||||||
QAction* action;
|
|
||||||
QIcon colored;
|
|
||||||
QIcon gray;
|
|
||||||
bool isActive;
|
|
||||||
};
|
|
||||||
|
|
||||||
class game_list_frame : public QDockWidget
|
class game_list_frame : public QDockWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -192,9 +184,6 @@ public:
|
|||||||
/** Adds/removes categories that should be shown on gamelist. Public so that main frame menu actions can apply them */
|
/** Adds/removes categories that should be shown on gamelist. Public so that main frame menu actions can apply them */
|
||||||
void ToggleCategoryFilter(const QStringList& categories, bool show);
|
void ToggleCategoryFilter(const QStringList& categories, bool show);
|
||||||
|
|
||||||
/** Returns the tool bar visibility. Public so that main frame can check the menu action accordingly */
|
|
||||||
bool GetToolBarVisible();
|
|
||||||
|
|
||||||
/** Loads from settings. Public so that main frame can easily reset these settings if needed. */
|
/** Loads from settings. Public so that main frame can easily reset these settings if needed. */
|
||||||
void LoadSettings();
|
void LoadSettings();
|
||||||
|
|
||||||
@ -207,15 +196,9 @@ public:
|
|||||||
/** Repaint Gamelist Icons with new background color */
|
/** Repaint Gamelist Icons with new background color */
|
||||||
void RepaintIcons(const bool& fromSettings = false);
|
void RepaintIcons(const bool& fromSettings = false);
|
||||||
|
|
||||||
/** Return current icon size slider value */
|
|
||||||
int GetSliderValue();
|
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void SetListMode(const bool& isList);
|
void SetListMode(const bool& isList);
|
||||||
void SetToolBarVisible(const bool& showToolBar);
|
|
||||||
void SetCategoryActIcon(const int& id, const bool& active);
|
|
||||||
void SetSearchText(const QString& text);
|
void SetSearchText(const QString& text);
|
||||||
void RepaintToolBarIcons();
|
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void RemoveCustomConfiguration(int row);
|
void RemoveCustomConfiguration(int row);
|
||||||
@ -228,10 +211,7 @@ Q_SIGNALS:
|
|||||||
void GameListFrameClosed();
|
void GameListFrameClosed();
|
||||||
void RequestIconPathSet(const std::string& path);
|
void RequestIconPathSet(const std::string& path);
|
||||||
void RequestAddRecentGame(const q_string_pair& entry);
|
void RequestAddRecentGame(const q_string_pair& entry);
|
||||||
void RequestIconSizeActSet(const int& idx);
|
void RequestIconSizeChange(const int& val);
|
||||||
void RequestListModeActSet(const bool& isList);
|
|
||||||
void RequestCategoryActSet(const int& id);
|
|
||||||
void RequestSaveSliderPos(const bool& save);
|
|
||||||
protected:
|
protected:
|
||||||
/** Override inherited method from Qt to allow signalling when close happened.*/
|
/** Override inherited method from Qt to allow signalling when close happened.*/
|
||||||
void closeEvent(QCloseEvent* event) override;
|
void closeEvent(QCloseEvent* event) override;
|
||||||
@ -266,20 +246,8 @@ private:
|
|||||||
|
|
||||||
// Categories
|
// Categories
|
||||||
QStringList m_categoryFilters;
|
QStringList m_categoryFilters;
|
||||||
Tool_Bar_Button m_catActHDD;
|
|
||||||
Tool_Bar_Button m_catActDisc;
|
|
||||||
Tool_Bar_Button m_catActHome;
|
|
||||||
Tool_Bar_Button m_catActGameData;
|
|
||||||
Tool_Bar_Button m_catActAudioVideo;
|
|
||||||
Tool_Bar_Button m_catActUnknown;
|
|
||||||
Tool_Bar_Button m_catActOther;
|
|
||||||
QList<Tool_Bar_Button*> m_categoryButtons;
|
|
||||||
QActionGroup* m_categoryActs;
|
|
||||||
|
|
||||||
// List Mode
|
// List Mode
|
||||||
Tool_Bar_Button m_modeActList;
|
|
||||||
Tool_Bar_Button m_modeActGrid;
|
|
||||||
QActionGroup* m_modeActs;
|
|
||||||
bool m_isListLayout = true;
|
bool m_isListLayout = true;
|
||||||
bool m_oldLayoutIsList = true;
|
bool m_oldLayoutIsList = true;
|
||||||
|
|
||||||
@ -288,16 +256,10 @@ private:
|
|||||||
std::shared_ptr<emu_settings> xemu_settings;
|
std::shared_ptr<emu_settings> xemu_settings;
|
||||||
std::vector<GUI_GameInfo> m_game_data;
|
std::vector<GUI_GameInfo> m_game_data;
|
||||||
|
|
||||||
// Toolbar
|
// Search
|
||||||
QToolBar* m_Tool_Bar;
|
QString m_search_text;
|
||||||
bool m_showToolBar = true;
|
|
||||||
|
|
||||||
// Search Bar
|
// Icon Size
|
||||||
QLineEdit* m_Search_Bar;
|
|
||||||
QString m_searchText;
|
|
||||||
|
|
||||||
// Icon Size Slider
|
|
||||||
QSlider* m_Slider_Size;
|
|
||||||
int m_icon_size_index;
|
int m_icon_size_index;
|
||||||
|
|
||||||
// Icons
|
// Icons
|
||||||
|
@ -121,7 +121,6 @@ namespace gui
|
|||||||
const QString savedata = "SaveData";
|
const QString savedata = "SaveData";
|
||||||
|
|
||||||
const QColor gl_icon_color = QColor(209, 209, 209, 255);
|
const QColor gl_icon_color = QColor(209, 209, 209, 255);
|
||||||
const QColor gl_tool_icon_color = QColor( 0, 100, 231, 255);
|
|
||||||
const QColor mw_tool_icon_color = QColor( 64, 64, 64, 255);
|
const QColor mw_tool_icon_color = QColor( 64, 64, 64, 255);
|
||||||
const QColor mw_tool_bar_color = QColor(227, 227, 227, 255);
|
const QColor mw_tool_bar_color = QColor(227, 227, 227, 255);
|
||||||
const QColor mw_thumb_icon_color = QColor( 0, 100, 231, 255);
|
const QColor mw_thumb_icon_color = QColor( 0, 100, 231, 255);
|
||||||
@ -158,16 +157,14 @@ namespace gui
|
|||||||
const gui_save cat_unknown = gui_save(game_list, "categoryVisibleUnknown", true );
|
const gui_save cat_unknown = gui_save(game_list, "categoryVisibleUnknown", true );
|
||||||
const gui_save cat_other = gui_save(game_list, "categoryVisibleOther", true );
|
const gui_save cat_other = gui_save(game_list, "categoryVisibleOther", true );
|
||||||
|
|
||||||
const gui_save gl_sortAsc = gui_save(game_list, "sortAsc", true );
|
const gui_save gl_sortAsc = gui_save(game_list, "sortAsc", true );
|
||||||
const gui_save gl_sortCol = gui_save(game_list, "sortCol", 1 );
|
const gui_save gl_sortCol = gui_save(game_list, "sortCol", 1 );
|
||||||
const gui_save gl_state = gui_save(game_list, "state", QByteArray() );
|
const gui_save gl_state = gui_save(game_list, "state", QByteArray() );
|
||||||
const gui_save gl_iconSize = gui_save(game_list, "iconSize", get_Index(gl_icon_size_small));
|
const gui_save gl_iconSize = gui_save(game_list, "iconSize", get_Index(gl_icon_size_small));
|
||||||
const gui_save gl_iconColor = gui_save(game_list, "iconColor", gl_icon_color);
|
const gui_save gl_iconColor = gui_save(game_list, "iconColor", gl_icon_color);
|
||||||
const gui_save gl_listMode = gui_save(game_list, "listMode", true );
|
const gui_save gl_listMode = gui_save(game_list, "listMode", true );
|
||||||
const gui_save gl_textFactor = gui_save(game_list, "textFactor", (qreal) 2.0 );
|
const gui_save gl_textFactor = gui_save(game_list, "textFactor", (qreal) 2.0 );
|
||||||
const gui_save gl_marginFactor = gui_save(game_list, "marginFactor", (qreal) 0.09 );
|
const gui_save gl_marginFactor = gui_save(game_list, "marginFactor", (qreal) 0.09 );
|
||||||
const gui_save gl_toolBarVisible = gui_save(game_list, "toolBarVisible", false);
|
|
||||||
const gui_save gl_toolIconColor = gui_save(game_list, "toolIconColor", gl_tool_icon_color);
|
|
||||||
|
|
||||||
const gui_save fs_emulator_dir_list = gui_save(fs, "emulator_dir_list", QStringList());
|
const gui_save fs_emulator_dir_list = gui_save(fs, "emulator_dir_list", QStringList());
|
||||||
const gui_save fs_dev_hdd0_list = gui_save(fs, "dev_hdd0_list", QStringList());
|
const gui_save fs_dev_hdd0_list = gui_save(fs, "dev_hdd0_list", QStringList());
|
||||||
|
@ -986,7 +986,6 @@ void main_window::RepaintGui()
|
|||||||
if (m_gameListFrame)
|
if (m_gameListFrame)
|
||||||
{
|
{
|
||||||
m_gameListFrame->RepaintIcons(true);
|
m_gameListFrame->RepaintIcons(true);
|
||||||
m_gameListFrame->RepaintToolBarIcons();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_logFrame)
|
if (m_logFrame)
|
||||||
@ -1210,11 +1209,6 @@ void main_window::CreateConnects()
|
|||||||
guiSettings->SetValue(gui::mw_toolBarVisible, checked);
|
guiSettings->SetValue(gui::mw_toolBarVisible, checked);
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(ui->showGameToolBarAct, &QAction::triggered, [=](bool checked)
|
|
||||||
{
|
|
||||||
m_gameListFrame->SetToolBarVisible(checked);
|
|
||||||
});
|
|
||||||
|
|
||||||
connect(ui->refreshGameListAct, &QAction::triggered, [=]
|
connect(ui->refreshGameListAct, &QAction::triggered, [=]
|
||||||
{
|
{
|
||||||
m_gameListFrame->Refresh(true);
|
m_gameListFrame->Refresh(true);
|
||||||
@ -1235,7 +1229,6 @@ void main_window::CreateConnects()
|
|||||||
else if (act == ui->showCatOtherAct) categories += category::others, id = Category::Others;
|
else if (act == ui->showCatOtherAct) categories += category::others, id = Category::Others;
|
||||||
else LOG_WARNING(GENERAL, "categoryVisibleActGroup: category action not found");
|
else LOG_WARNING(GENERAL, "categoryVisibleActGroup: category action not found");
|
||||||
|
|
||||||
m_gameListFrame->SetCategoryActIcon(m_categoryVisibleActGroup->actions().indexOf(act), checked);
|
|
||||||
m_gameListFrame->ToggleCategoryFilter(categories, checked);
|
m_gameListFrame->ToggleCategoryFilter(categories, checked);
|
||||||
guiSettings->SetCategoryVisibility(id, checked);
|
guiSettings->SetCategoryVisibility(id, checked);
|
||||||
});
|
});
|
||||||
@ -1250,20 +1243,16 @@ void main_window::CreateConnects()
|
|||||||
|
|
||||||
auto resizeIcons = [=](const int& index)
|
auto resizeIcons = [=](const int& index)
|
||||||
{
|
{
|
||||||
int val = ui->sizeSlider->value();
|
if (ui->sizeSlider->value() != index)
|
||||||
if (val != index)
|
|
||||||
{
|
{
|
||||||
ui->sizeSlider->setSliderPosition(index);
|
ui->sizeSlider->setSliderPosition(index);
|
||||||
}
|
}
|
||||||
if (val != m_gameListFrame->GetSliderValue())
|
if (m_save_slider_pos)
|
||||||
{
|
{
|
||||||
if (m_save_slider_pos)
|
m_save_slider_pos = false;
|
||||||
{
|
guiSettings->SetValue(gui::gl_iconSize, index);
|
||||||
m_save_slider_pos = false;
|
|
||||||
guiSettings->SetValue(gui::gl_iconSize, index);
|
|
||||||
}
|
|
||||||
m_gameListFrame->ResizeIcons(index);
|
|
||||||
}
|
}
|
||||||
|
m_gameListFrame->ResizeIcons(index);
|
||||||
};
|
};
|
||||||
|
|
||||||
connect(m_iconSizeActGroup, &QActionGroup::triggered, [=](QAction* act)
|
connect(m_iconSizeActGroup, &QActionGroup::triggered, [=](QAction* act)
|
||||||
@ -1283,28 +1272,14 @@ void main_window::CreateConnects()
|
|||||||
resizeIcons(index);
|
resizeIcons(index);
|
||||||
});
|
});
|
||||||
|
|
||||||
connect (m_gameListFrame, &game_list_frame::RequestIconSizeActSet, [=](const int& idx)
|
connect (m_gameListFrame, &game_list_frame::RequestIconSizeChange, [=](const int& val)
|
||||||
{
|
{
|
||||||
|
const int idx = ui->sizeSlider->value() + val;
|
||||||
|
m_save_slider_pos = true;
|
||||||
SetIconSizeActions(idx);
|
SetIconSizeActions(idx);
|
||||||
resizeIcons(idx);
|
resizeIcons(idx);
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(m_gameListFrame, &game_list_frame::RequestSaveSliderPos, [=](const bool& save)
|
|
||||||
{
|
|
||||||
Q_UNUSED(save);
|
|
||||||
m_save_slider_pos = true;
|
|
||||||
});
|
|
||||||
|
|
||||||
connect(m_gameListFrame, &game_list_frame::RequestListModeActSet, [=](const bool& isList)
|
|
||||||
{
|
|
||||||
isList ? ui->setlistModeListAct->trigger() : ui->setlistModeGridAct->trigger();
|
|
||||||
});
|
|
||||||
|
|
||||||
connect(m_gameListFrame, &game_list_frame::RequestCategoryActSet, [=](const int& id)
|
|
||||||
{
|
|
||||||
m_categoryVisibleActGroup->actions().at(id)->trigger();
|
|
||||||
});
|
|
||||||
|
|
||||||
connect(m_listModeActGroup, &QActionGroup::triggered, [=](QAction* act)
|
connect(m_listModeActGroup, &QActionGroup::triggered, [=](QAction* act)
|
||||||
{
|
{
|
||||||
bool isList = act == ui->setlistModeListAct;
|
bool isList = act == ui->setlistModeListAct;
|
||||||
@ -1335,9 +1310,9 @@ void main_window::CreateConnects()
|
|||||||
connect(ui->toolbar_config, &QAction::triggered, [=]() { openSettings(0); });
|
connect(ui->toolbar_config, &QAction::triggered, [=]() { openSettings(0); });
|
||||||
connect(ui->toolbar_list, &QAction::triggered, [=]() { ui->setlistModeListAct->trigger(); });
|
connect(ui->toolbar_list, &QAction::triggered, [=]() { ui->setlistModeListAct->trigger(); });
|
||||||
connect(ui->toolbar_grid, &QAction::triggered, [=]() { ui->setlistModeGridAct->trigger(); });
|
connect(ui->toolbar_grid, &QAction::triggered, [=]() { ui->setlistModeGridAct->trigger(); });
|
||||||
|
|
||||||
connect(ui->sizeSlider, &QSlider::valueChanged, resizeIcons);
|
connect(ui->sizeSlider, &QSlider::valueChanged, resizeIcons);
|
||||||
connect(ui->sizeSlider, &QSlider::sliderReleased, this, [&] { guiSettings->SetValue(gui::gl_iconSize, ui->sizeSlider->value()); });
|
connect(ui->sizeSlider, &QSlider::sliderReleased, this, [&] { guiSettings->SetValue(gui::gl_iconSize, ui->sizeSlider->value()); });
|
||||||
|
|
||||||
connect(ui->sizeSlider, &QSlider::actionTriggered, [&](int action)
|
connect(ui->sizeSlider, &QSlider::actionTriggered, [&](int action)
|
||||||
{
|
{
|
||||||
if (action != QAbstractSlider::SliderNoAction && action != QAbstractSlider::SliderMove)
|
if (action != QAbstractSlider::SliderNoAction && action != QAbstractSlider::SliderMove)
|
||||||
@ -1452,12 +1427,10 @@ void main_window::ConfigureGuiFromSettings(bool configure_all)
|
|||||||
ui->showGameListAct->setChecked(guiSettings->GetValue(gui::mw_gamelist).toBool());
|
ui->showGameListAct->setChecked(guiSettings->GetValue(gui::mw_gamelist).toBool());
|
||||||
ui->showDebuggerAct->setChecked(guiSettings->GetValue(gui::mw_debugger).toBool());
|
ui->showDebuggerAct->setChecked(guiSettings->GetValue(gui::mw_debugger).toBool());
|
||||||
ui->showToolBarAct->setChecked(guiSettings->GetValue(gui::mw_toolBarVisible).toBool());
|
ui->showToolBarAct->setChecked(guiSettings->GetValue(gui::mw_toolBarVisible).toBool());
|
||||||
ui->showGameToolBarAct->setChecked(guiSettings->GetValue(gui::gl_toolBarVisible).toBool());
|
|
||||||
|
|
||||||
m_debuggerFrame->setVisible(ui->showDebuggerAct->isChecked());
|
m_debuggerFrame->setVisible(ui->showDebuggerAct->isChecked());
|
||||||
m_logFrame->setVisible(ui->showLogAct->isChecked());
|
m_logFrame->setVisible(ui->showLogAct->isChecked());
|
||||||
m_gameListFrame->setVisible(ui->showGameListAct->isChecked());
|
m_gameListFrame->setVisible(ui->showGameListAct->isChecked());
|
||||||
m_gameListFrame->SetToolBarVisible(ui->showGameToolBarAct->isChecked());
|
|
||||||
ui->toolBar->setVisible(ui->showToolBarAct->isChecked());
|
ui->toolBar->setVisible(ui->showToolBarAct->isChecked());
|
||||||
|
|
||||||
RepaintToolbar();
|
RepaintToolbar();
|
||||||
|
@ -141,7 +141,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1058</width>
|
<width>1058</width>
|
||||||
<height>26</height>
|
<height>38</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="contextMenuPolicy">
|
<property name="contextMenuPolicy">
|
||||||
@ -260,7 +260,6 @@
|
|||||||
<addaction name="showToolBarAct"/>
|
<addaction name="showToolBarAct"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="showGameListAct"/>
|
<addaction name="showGameListAct"/>
|
||||||
<addaction name="showGameToolBarAct"/>
|
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="refreshGameListAct"/>
|
<addaction name="refreshGameListAct"/>
|
||||||
<addaction name="menuGame_List_Mode"/>
|
<addaction name="menuGame_List_Mode"/>
|
||||||
|
@ -765,7 +765,6 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
|||||||
{
|
{
|
||||||
addColoredIcon(ui->pb_gl_icon_color, xgui_settings->GetValue(gui::gl_iconColor).value<QColor>());
|
addColoredIcon(ui->pb_gl_icon_color, xgui_settings->GetValue(gui::gl_iconColor).value<QColor>());
|
||||||
addColoredIcon(ui->pb_tool_bar_color, xgui_settings->GetValue(gui::mw_toolBarColor).value<QColor>());
|
addColoredIcon(ui->pb_tool_bar_color, xgui_settings->GetValue(gui::mw_toolBarColor).value<QColor>());
|
||||||
addColoredIcon(ui->pb_gl_tool_icon_color, xgui_settings->GetValue(gui::gl_toolIconColor).value<QColor>(), QIcon(":/Icons/home_blue.png"), gui::gl_tool_icon_color);
|
|
||||||
addColoredIcon(ui->pb_tool_icon_color, xgui_settings->GetValue(gui::mw_toolIconColor).value<QColor>(), QIcon(":/Icons/stop.png"), gui::mw_tool_icon_color);
|
addColoredIcon(ui->pb_tool_icon_color, xgui_settings->GetValue(gui::mw_toolIconColor).value<QColor>(), QIcon(":/Icons/stop.png"), gui::mw_tool_icon_color);
|
||||||
};
|
};
|
||||||
AddColoredIcons();
|
AddColoredIcons();
|
||||||
@ -775,7 +774,6 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
|||||||
bool enableUIColors = xgui_settings->GetValue(gui::m_enableUIColors).toBool();
|
bool enableUIColors = xgui_settings->GetValue(gui::m_enableUIColors).toBool();
|
||||||
ui->cb_custom_colors->setChecked(enableUIColors);
|
ui->cb_custom_colors->setChecked(enableUIColors);
|
||||||
ui->pb_gl_icon_color->setEnabled(enableUIColors);
|
ui->pb_gl_icon_color->setEnabled(enableUIColors);
|
||||||
ui->pb_gl_tool_icon_color->setEnabled(enableUIColors);
|
|
||||||
ui->pb_tool_bar_color->setEnabled(enableUIColors);
|
ui->pb_tool_bar_color->setEnabled(enableUIColors);
|
||||||
ui->pb_tool_icon_color->setEnabled(enableUIColors);
|
ui->pb_tool_icon_color->setEnabled(enableUIColors);
|
||||||
|
|
||||||
@ -834,7 +832,6 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
|||||||
{
|
{
|
||||||
xgui_settings->SetValue(gui::m_enableUIColors, val);
|
xgui_settings->SetValue(gui::m_enableUIColors, val);
|
||||||
ui->pb_gl_icon_color->setEnabled(val);
|
ui->pb_gl_icon_color->setEnabled(val);
|
||||||
ui->pb_gl_tool_icon_color->setEnabled(val);
|
|
||||||
ui->pb_tool_bar_color->setEnabled(val);
|
ui->pb_tool_bar_color->setEnabled(val);
|
||||||
ui->pb_tool_icon_color->setEnabled(val);
|
ui->pb_tool_icon_color->setEnabled(val);
|
||||||
Q_EMIT GuiRepaintRequest();
|
Q_EMIT GuiRepaintRequest();
|
||||||
@ -866,11 +863,6 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
|||||||
colorDialog(gui::gl_iconColor, tr("Choose gamelist icon color"), ui->pb_gl_icon_color);
|
colorDialog(gui::gl_iconColor, tr("Choose gamelist icon color"), ui->pb_gl_icon_color);
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(ui->pb_gl_tool_icon_color, &QAbstractButton::clicked, [=]()
|
|
||||||
{
|
|
||||||
colorDialog(gui::gl_toolIconColor, tr("Choose gamelist tool icon color"), ui->pb_gl_tool_icon_color);
|
|
||||||
});
|
|
||||||
|
|
||||||
connect(ui->pb_tool_bar_color, &QAbstractButton::clicked, [=]()
|
connect(ui->pb_tool_bar_color, &QAbstractButton::clicked, [=]()
|
||||||
{
|
{
|
||||||
colorDialog(gui::mw_toolBarColor, tr("Choose tool bar color"), ui->pb_tool_bar_color);
|
colorDialog(gui::mw_toolBarColor, tr("Choose tool bar color"), ui->pb_tool_bar_color);
|
||||||
|
@ -1508,13 +1508,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="pb_gl_tool_icon_color">
|
|
||||||
<property name="text">
|
|
||||||
<string>Gamelist tool icons</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer_5">
|
<spacer name="verticalSpacer_5">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|