mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-17 08:11:51 +00:00
stylesheets: make toolbar styles more accessible
This commit is contained in:
parent
a18fddb831
commit
a0176775ff
@ -287,7 +287,11 @@ void rpcs3_app::OnChangeStyleSheetRequest(const QString& sheetFilePath)
|
|||||||
QFile file(sheetFilePath);
|
QFile file(sheetFilePath);
|
||||||
if (sheetFilePath == "")
|
if (sheetFilePath == "")
|
||||||
{
|
{
|
||||||
setStyleSheet("QWidget#header_section {background-color: #ffffff}");
|
setStyleSheet(
|
||||||
|
"QWidget#header_section { background-color: #ffffff; }"
|
||||||
|
"QLineEdit#mw_searchbar { margin-left:14px; }"
|
||||||
|
"QLineEdit#tb_searchbar { background: transparent; }"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
else if (file.open(QIODevice::ReadOnly | QIODevice::Text))
|
else if (file.open(QIODevice::ReadOnly | QIODevice::Text))
|
||||||
{
|
{
|
||||||
|
@ -112,9 +112,6 @@
|
|||||||
<bold>false</bold>
|
<bold>false</bold>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>RPCS3 PlayStation 3 Emulator</string>
|
<string>RPCS3 PlayStation 3 Emulator</string>
|
||||||
</property>
|
</property>
|
||||||
@ -131,9 +128,6 @@
|
|||||||
<kerning>true</kerning>
|
<kerning>true</kerning>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><html><head/><body><p>RPCS3 is an open-source Sony PlayStation 3 emulator and debugger.<br/>It is written in C++ for Windows and Linux funded with <a href="https://www.patreon.com/Nekotekina"><span style=" text-decoration: underline; color:#0000ff;">Patreon</span></a>.<br/>Our developers and contributors are always working hard to ensure this project can be the best that it can be.<br/>There are still plenty of implementations to be made and optimizations to be done.</p></body></html></string>
|
<string><html><head/><body><p>RPCS3 is an open-source Sony PlayStation 3 emulator and debugger.<br/>It is written in C++ for Windows and Linux funded with <a href="https://www.patreon.com/Nekotekina"><span style=" text-decoration: underline; color:#0000ff;">Patreon</span></a>.<br/>Our developers and contributors are always working hard to ensure this project can be the best that it can be.<br/>There are still plenty of implementations to be made and optimizations to be done.</p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
@ -159,9 +153,6 @@
|
|||||||
<kerning>true</kerning>
|
<kerning>true</kerning>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
|
@ -104,11 +104,10 @@ game_list_frame::game_list_frame(std::shared_ptr<gui_settings> settings, const R
|
|||||||
|
|
||||||
// Search Bar
|
// Search Bar
|
||||||
m_Search_Bar = new QLineEdit(m_Tool_Bar);
|
m_Search_Bar = new QLineEdit(m_Tool_Bar);
|
||||||
m_Search_Bar->setObjectName("tb_searchbar");
|
m_Search_Bar->setObjectName("tb_searchbar"); // used in default stylesheet
|
||||||
m_Search_Bar->setPlaceholderText(tr("Search games ..."));
|
m_Search_Bar->setPlaceholderText(tr("Search games ..."));
|
||||||
m_Search_Bar->setMinimumWidth(m_Tool_Bar->height() * 5);
|
m_Search_Bar->setMinimumWidth(m_Tool_Bar->height() * 5);
|
||||||
m_Search_Bar->setFrame(false);
|
m_Search_Bar->setFrame(false);
|
||||||
m_Search_Bar->setStyleSheet("QLineEdit#tb_searchbar { background: transparent }");
|
|
||||||
connect(m_Search_Bar, &QLineEdit::textChanged, [this](const QString& text) {
|
connect(m_Search_Bar, &QLineEdit::textChanged, [this](const QString& text) {
|
||||||
m_searchText = text;
|
m_searchText = text;
|
||||||
Refresh();
|
Refresh();
|
||||||
@ -842,7 +841,7 @@ void game_list_frame::RepaintToolBarIcons()
|
|||||||
m_modeActGrid.colored = gui_settings::colorizedIcon(QIcon(":/Icons/grid_blue.png"), GUI::gl_tool_icon_color, newColor);
|
m_modeActGrid.colored = gui_settings::colorizedIcon(QIcon(":/Icons/grid_blue.png"), GUI::gl_tool_icon_color, newColor);
|
||||||
m_modeActGrid.action->setIcon(m_isListLayout ? m_modeActGrid.gray : m_modeActGrid.colored);
|
m_modeActGrid.action->setIcon(m_isListLayout ? m_modeActGrid.gray : m_modeActGrid.colored);
|
||||||
|
|
||||||
m_Slider_Size->setStyleSheet(QString("QSlider::handle:horizontal{ background: rgba(%1, %2, %3, %4); }")
|
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()));
|
.arg(newColor.red()).arg(newColor.green()).arg(newColor.blue()).arg(newColor.alpha()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ void main_window::Init()
|
|||||||
ui->sizeSlider->setSliderPosition(guiSettings->GetValue(GUI::gl_iconSize).toInt());
|
ui->sizeSlider->setSliderPosition(guiSettings->GetValue(GUI::gl_iconSize).toInt());
|
||||||
ui->toolBar->addWidget(ui->sizeSliderContainer);
|
ui->toolBar->addWidget(ui->sizeSliderContainer);
|
||||||
ui->toolBar->addSeparator();
|
ui->toolBar->addSeparator();
|
||||||
ui->toolBar->addWidget(ui->searchBar);
|
ui->toolBar->addWidget(ui->mw_searchbar);
|
||||||
|
|
||||||
// for highdpi resize toolbar icons and height dynamically
|
// for highdpi resize toolbar icons and height dynamically
|
||||||
// choose factors to mimic Gui-Design in main_window.ui
|
// choose factors to mimic Gui-Design in main_window.ui
|
||||||
@ -735,7 +735,7 @@ void main_window::RepaintToolBarIcons()
|
|||||||
ui->toolbar_fullscreen->setIcon(icon_fullscreen_off);
|
ui->toolbar_fullscreen->setIcon(icon_fullscreen_off);
|
||||||
}
|
}
|
||||||
|
|
||||||
ui->sizeSlider->setStyleSheet(QString("QSlider::handle:horizontal{ background: rgba(%1, %2, %3, %4); }")
|
ui->sizeSlider->setStyleSheet(ui->sizeSlider->styleSheet().append("QSlider::handle:horizontal{ background: rgba(%1, %2, %3, %4); }")
|
||||||
.arg(newColor.red()).arg(newColor.green()).arg(newColor.blue()).arg(newColor.alpha()));
|
.arg(newColor.red()).arg(newColor.green()).arg(newColor.blue()).arg(newColor.alpha()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1024,6 +1024,18 @@ void main_window::AddRecentAction(const q_string_pair& entry)
|
|||||||
guiSettings->SetValue(GUI::rg_entries, guiSettings->List2Var(m_rg_entries));
|
guiSettings->SetValue(GUI::rg_entries, guiSettings->List2Var(m_rg_entries));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void main_window::RepaintToolbar()
|
||||||
|
{
|
||||||
|
QColor tbc = guiSettings->GetValue(GUI::mw_toolBarColor).value<QColor>();
|
||||||
|
ui->toolBar->setStyleSheet(styleSheet().append(
|
||||||
|
"QToolBar { background-color: rgba(%1, %2, %3, %4); }"
|
||||||
|
"QToolBar::separator {background-color: rgba(%5, %6, %7, %8); width: 1px; margin-top: 2px; margin-bottom: 2px;}"
|
||||||
|
"QSlider { background-color: rgba(%1, %2, %3, %4); }"
|
||||||
|
"QLineEdit { background-color: rgba(%1, %2, %3, %4); }")
|
||||||
|
.arg(tbc.red()).arg(tbc.green()).arg(tbc.blue()).arg(tbc.alpha())
|
||||||
|
.arg(tbc.red() - 20).arg(tbc.green() - 20).arg(tbc.blue() - 20).arg(tbc.alpha() - 20));
|
||||||
|
}
|
||||||
|
|
||||||
void main_window::CreateActions()
|
void main_window::CreateActions()
|
||||||
{
|
{
|
||||||
ui->exitAct->setShortcuts(QKeySequence::Quit);
|
ui->exitAct->setShortcuts(QKeySequence::Quit);
|
||||||
@ -1105,14 +1117,7 @@ void main_window::CreateConnects()
|
|||||||
connect(&dlg, &settings_dialog::ToolBarRepaintRequest, gameListFrame, &game_list_frame::RepaintToolBarIcons);
|
connect(&dlg, &settings_dialog::ToolBarRepaintRequest, gameListFrame, &game_list_frame::RepaintToolBarIcons);
|
||||||
connect(&dlg, &settings_dialog::accepted, [this](){
|
connect(&dlg, &settings_dialog::accepted, [this](){
|
||||||
gameListFrame->RepaintIcons(guiSettings->GetValue(GUI::gl_iconColor).value<QColor>());
|
gameListFrame->RepaintIcons(guiSettings->GetValue(GUI::gl_iconColor).value<QColor>());
|
||||||
QColor tbc = guiSettings->GetValue(GUI::mw_toolBarColor).value<QColor>();
|
RepaintToolbar();
|
||||||
ui->toolBar->setStyleSheet(QString(
|
|
||||||
"QToolBar { background-color: rgba(%1, %2, %3, %4); }"
|
|
||||||
"QToolBar::separator {background-color: rgba(%5, %6, %7, %8); width: 1px; margin-top: 2px; margin-bottom: 2px;}"
|
|
||||||
"QSlider { background-color: rgba(%1, %2, %3, %4); }"
|
|
||||||
"QLineEdit { background-color: rgba(%1, %2, %3, %4); }")
|
|
||||||
.arg(tbc.red()).arg(tbc.green()).arg(tbc.blue()).arg(tbc.alpha())
|
|
||||||
.arg(tbc.red() - 20).arg(tbc.green() - 20).arg(tbc.blue() - 20).arg(tbc.alpha() - 20));
|
|
||||||
});
|
});
|
||||||
dlg.exec();
|
dlg.exec();
|
||||||
};
|
};
|
||||||
@ -1287,7 +1292,7 @@ void main_window::CreateConnects()
|
|||||||
m_save_slider_pos = true; // actionTriggered happens before the value was changed
|
m_save_slider_pos = true; // actionTriggered happens before the value was changed
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
connect(ui->searchBar, &QLineEdit::textChanged, gameListFrame, &game_list_frame::SetSearchText);
|
connect(ui->mw_searchbar, &QLineEdit::textChanged, gameListFrame, &game_list_frame::SetSearchText);
|
||||||
}
|
}
|
||||||
|
|
||||||
void main_window::CreateDockWindows()
|
void main_window::CreateDockWindows()
|
||||||
@ -1400,14 +1405,7 @@ void main_window::ConfigureGuiFromSettings(bool configureAll)
|
|||||||
gameListFrame->SetToolBarVisible(ui->showGameToolBarAct->isChecked());
|
gameListFrame->SetToolBarVisible(ui->showGameToolBarAct->isChecked());
|
||||||
ui->toolBar->setVisible(ui->showToolBarAct->isChecked());
|
ui->toolBar->setVisible(ui->showToolBarAct->isChecked());
|
||||||
|
|
||||||
QColor tbc = guiSettings->GetValue(GUI::mw_toolBarColor).value<QColor>();
|
RepaintToolbar();
|
||||||
ui->toolBar->setStyleSheet(QString(
|
|
||||||
"QToolBar { background-color: rgba(%1, %2, %3, %4); }"
|
|
||||||
"QToolBar::separator {background-color: rgba(%5, %6, %7, %8); width: 1px; margin-top: 2px; margin-bottom: 2px;}"
|
|
||||||
"QSlider { background-color: rgba(%1, %2, %3, %4); }"
|
|
||||||
"QLineEdit { background-color: rgba(%1, %2, %3, %4); }")
|
|
||||||
.arg(tbc.red()).arg(tbc.green()).arg(tbc.blue()).arg(tbc.alpha())
|
|
||||||
.arg(tbc.red() - 20).arg(tbc.green() - 20).arg(tbc.blue() - 20).arg(tbc.alpha() - 20));
|
|
||||||
|
|
||||||
ui->showCatHDDGameAct->setChecked(guiSettings->GetCategoryVisibility(Category::Non_Disc_Game));
|
ui->showCatHDDGameAct->setChecked(guiSettings->GetCategoryVisibility(Category::Non_Disc_Game));
|
||||||
ui->showCatDiscGameAct->setChecked(guiSettings->GetCategoryVisibility(Category::Disc_Game));
|
ui->showCatDiscGameAct->setChecked(guiSettings->GetCategoryVisibility(Category::Disc_Game));
|
||||||
|
@ -87,6 +87,7 @@ protected:
|
|||||||
void mouseDoubleClickEvent(QMouseEvent *event) override;
|
void mouseDoubleClickEvent(QMouseEvent *event) override;
|
||||||
void SetAppIconFromPath(const std::string path);
|
void SetAppIconFromPath(const std::string path);
|
||||||
private:
|
private:
|
||||||
|
void RepaintToolbar();
|
||||||
void CreateActions();
|
void CreateActions();
|
||||||
void CreateConnects();
|
void CreateConnects();
|
||||||
void CreateDockWindows();
|
void CreateDockWindows();
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QLineEdit" name="searchBar">
|
<widget class="QLineEdit" name="mw_searchbar">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>480</x>
|
<x>480</x>
|
||||||
@ -69,10 +69,6 @@
|
|||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
<enum>Qt::ClickFocus</enum>
|
<enum>Qt::ClickFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">color:#5e5e5e;
|
|
||||||
margin-left:14px;</string>
|
|
||||||
</property>
|
|
||||||
<property name="frame">
|
<property name="frame">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
@ -295,12 +291,6 @@ margin-left:14px;</string>
|
|||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Show tool bar</string>
|
<string>Show tool bar</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">QToolBar { background-color: rgba(227, 227, 227, 255); }
|
|
||||||
QToolBar::separator {background-color: #D1D1D1; width: 1px; margin-top: 2px; margin-bottom: 2px;}
|
|
||||||
QSlider { background-color: rgba(227, 227, 227, 255); }
|
|
||||||
QLineEdit { background-color: rgba(227, 227, 227, 255); }</string>
|
|
||||||
</property>
|
|
||||||
<property name="movable">
|
<property name="movable">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -23,12 +23,6 @@
|
|||||||
<iconset resource="../resources.qrc">
|
<iconset resource="../resources.qrc">
|
||||||
<normaloff>:/rpcs3.ico</normaloff>:/rpcs3.ico</iconset>
|
<normaloff>:/rpcs3.ico</normaloff>:/rpcs3.ico</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="autoFillBackground">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
@ -120,9 +114,6 @@
|
|||||||
<bold>false</bold>
|
<bold>false</bold>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>RPCS3 PlayStation 3 Emulator</string>
|
<string>RPCS3 PlayStation 3 Emulator</string>
|
||||||
</property>
|
</property>
|
||||||
@ -185,9 +176,6 @@
|
|||||||
<kerning>true</kerning>
|
<kerning>true</kerning>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><html><head/><body><p>To get started, you must first install the <span style=" font-weight:600;">PlayStation 3 firmware</span>.<br/>Please refer to the <a href="https://rpcs3.net/quickstart"><span style=" text-decoration: underline; color:#0000ff;">Quickstart</span></a> guide found on the official website for further information.<br/>If you have any further questions, please refer to the <a href="https://rpcs3.net/faq"><span style=" text-decoration: underline; color:#0000ff;">FAQ</span></a>.<br/>Otherwise, further discussion and support can be found on the <a href="http://www.emunewz.net/forum/forumdisplay.php?fid=172"><span style=" text-decoration: underline; color:#0000ff;">Forums</span></a> or on our <a href="https://discord.me/RPCS3"><span style=" text-decoration: underline; color:#0000ff;">Discord</span></a> server.</p></body></html></string>
|
<string><html><head/><body><p>To get started, you must first install the <span style=" font-weight:600;">PlayStation 3 firmware</span>.<br/>Please refer to the <a href="https://rpcs3.net/quickstart"><span style=" text-decoration: underline; color:#0000ff;">Quickstart</span></a> guide found on the official website for further information.<br/>If you have any further questions, please refer to the <a href="https://rpcs3.net/faq"><span style=" text-decoration: underline; color:#0000ff;">FAQ</span></a>.<br/>Otherwise, further discussion and support can be found on the <a href="http://www.emunewz.net/forum/forumdisplay.php?fid=172"><span style=" text-decoration: underline; color:#0000ff;">Forums</span></a> or on our <a href="https://discord.me/RPCS3"><span style=" text-decoration: underline; color:#0000ff;">Discord</span></a> server.</p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
@ -215,9 +203,6 @@
|
|||||||
<bold>false</bold>
|
<bold>false</bold>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><html><head/><body><p><br/><span style=" font-weight:600; color:#ff0000;">RPCS3 does not condone piracy. You must dump your own games.</span><br/></p></body></html></string>
|
<string><html><head/><body><p><br/><span style=" font-weight:600; color:#ff0000;">RPCS3 does not condone piracy. You must dump your own games.</span><br/></p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
@ -265,9 +250,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item alignment="Qt::AlignLeft">
|
<item alignment="Qt::AlignLeft">
|
||||||
<widget class="QCheckBox" name="i_have_read">
|
<widget class="QCheckBox" name="i_have_read">
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>I have read the Quickstart guide</string>
|
<string>I have read the Quickstart guide</string>
|
||||||
</property>
|
</property>
|
||||||
@ -288,9 +270,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item alignment="Qt::AlignLeft">
|
<item alignment="Qt::AlignLeft">
|
||||||
<widget class="QCheckBox" name="do_not_show">
|
<widget class="QCheckBox" name="do_not_show">
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Do not show again</string>
|
<string>Do not show again</string>
|
||||||
</property>
|
</property>
|
||||||
|
Loading…
Reference in New Issue
Block a user