mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-03-24 19:38:32 -06:00
Qt: Remove some unused code
This commit is contained in:
parent
67f69bb4b3
commit
cd1d6282b4
@ -37,10 +37,6 @@ QSlider#sizeSlider::handle:horizontal {
|
||||
QLabel#toolbar_icon_color {
|
||||
color: rgba(64,64,64,255);
|
||||
}
|
||||
/* thumbnail icon color stylesheet */
|
||||
QLabel#thumbnail_icon_color {
|
||||
color: rgba(0,100,231,255);
|
||||
}
|
||||
/* gamelist icon color stylesheet */
|
||||
QLabel#gamelist_icon_background_color {
|
||||
color: rgba(209,209,209,255);
|
||||
|
||||
@ -237,11 +237,6 @@ QLabel#gamelist_icon_background_color {
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
/* Set Windows Taskbar Thumbnail colors */
|
||||
QLabel#thumbnail_icon_color {
|
||||
color: #262626;
|
||||
}
|
||||
|
||||
/* Set Log colors */
|
||||
QPlainTextEdit#log_frame {
|
||||
background-color: #000; /* Black */
|
||||
|
||||
@ -573,11 +573,6 @@ QLabel#gamelist_icon_background_color {
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
/* Set Windows Taskbar Thumbnail colors */
|
||||
QLabel#thumbnail_icon_color {
|
||||
color: #23262d;
|
||||
}
|
||||
|
||||
/* Log colors */
|
||||
QPlainTextEdit#log_frame {
|
||||
background-color: #23262d;
|
||||
|
||||
@ -265,11 +265,6 @@ QLabel#gamelist_icon_background_color {
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
/* Set Taskbar Thumbnail colors */
|
||||
QLabel#thumbnail_icon_color {
|
||||
color: #444444;
|
||||
}
|
||||
|
||||
/* Memory Viewer */
|
||||
QLabel#memory_viewer_address_panel {
|
||||
color: #00cbff; /* Font Color: Blue */
|
||||
|
||||
@ -244,11 +244,6 @@ QLabel#gamelist_icon_background_color {
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
/* Set Windows Taskbar Thumbnail colors */
|
||||
QLabel#thumbnail_icon_color {
|
||||
color: #262626;
|
||||
}
|
||||
|
||||
/* Set Log colors */
|
||||
QPlainTextEdit#log_frame {
|
||||
background-color: #181d24; /* Black */
|
||||
|
||||
@ -397,12 +397,6 @@ QLabel#gamelist_icon_background_color {
|
||||
}
|
||||
|
||||
|
||||
/* Set Windows Taskbar Thumbnail colors */
|
||||
QLabel#thumbnail_icon_color {
|
||||
color: #ffd785;
|
||||
}
|
||||
|
||||
|
||||
QLabel#log_level_always {
|
||||
color: #00ffff; /* Cyan */
|
||||
}
|
||||
|
||||
@ -656,11 +656,6 @@ QLabel#color_button {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
/* Set Windows Taskbar Thumbnail colors */
|
||||
QLabel#thumbnail_icon_color {
|
||||
color: #370048;
|
||||
}
|
||||
|
||||
/* Debugger colors */
|
||||
QLabel#debugger_frame_breakpoint {
|
||||
color: #000; /* Font Color: Black */
|
||||
|
||||
@ -664,11 +664,6 @@ QLabel#color_button {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
/* Set Windows Taskbar Thumbnail colors */
|
||||
QLabel#thumbnail_icon_color {
|
||||
color: #8500ae;
|
||||
}
|
||||
|
||||
/* Debugger colors */
|
||||
QLabel#debugger_frame_breakpoint {
|
||||
color: #000; /* Font Color: Black */
|
||||
|
||||
@ -379,11 +379,6 @@ QLabel#gamelist_icon_background_color {
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
/* Set Windows Taskbar Thumbnail colors */
|
||||
QLabel#thumbnail_icon_color {
|
||||
color: #4d4940;
|
||||
}
|
||||
|
||||
QLabel#log_level_always {
|
||||
color: #00ffff; /* Cyan */
|
||||
}
|
||||
|
||||
@ -213,8 +213,6 @@ bool main_window::Init([[maybe_unused]] bool with_cli_boot)
|
||||
m_shortcut_handler = new shortcut_handler(gui::shortcuts::shortcut_handler_id::main_window, this, m_gui_settings);
|
||||
connect(m_shortcut_handler, &shortcut_handler::shortcut_activated, this, &main_window::handle_shortcut);
|
||||
|
||||
show(); // needs to be done before creating the thumbnail toolbar
|
||||
|
||||
// enable play options if a recent game exists
|
||||
const bool enable_play_last = !m_recent_game.actions.isEmpty() && m_recent_game.actions.first();
|
||||
|
||||
@ -279,6 +277,8 @@ bool main_window::Init([[maybe_unused]] bool with_cli_boot)
|
||||
|
||||
update_gui_pad_thread();
|
||||
|
||||
show();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1795,17 +1795,6 @@ void main_window::SaveWindowState() const
|
||||
}
|
||||
}
|
||||
|
||||
void main_window::RepaintThumbnailIcons()
|
||||
{
|
||||
const QColor color = gui::utils::get_foreground_color();
|
||||
[[maybe_unused]] const QColor new_color = gui::utils::get_label_color("thumbnail_icon_color", color, color);
|
||||
|
||||
[[maybe_unused]] const auto icon = [&new_color](const QString& path)
|
||||
{
|
||||
return gui::utils::get_colorized_icon(QPixmap::fromImage(gui::utils::get_opaque_image_area(path)), Qt::black, new_color);
|
||||
};
|
||||
}
|
||||
|
||||
void main_window::RepaintToolBarIcons()
|
||||
{
|
||||
const QColor color = gui::utils::get_foreground_color();
|
||||
@ -2311,7 +2300,6 @@ void main_window::RepaintGui()
|
||||
}
|
||||
|
||||
RepaintToolBarIcons();
|
||||
RepaintThumbnailIcons();
|
||||
|
||||
Q_EMIT RequestDialogRepaint();
|
||||
}
|
||||
|
||||
@ -134,7 +134,6 @@ protected:
|
||||
private:
|
||||
void ConfigureGuiFromSettings();
|
||||
void RepaintToolBarIcons();
|
||||
void RepaintThumbnailIcons();
|
||||
void CreateActions();
|
||||
void CreateConnects();
|
||||
void CreateDockWindows();
|
||||
|
||||
@ -312,45 +312,6 @@ namespace gui
|
||||
return get_aligned_pixmap(QPixmap(path), icon_size, device_pixel_ratio, mode, h_alignment, v_alignment);
|
||||
}
|
||||
|
||||
QImage get_opaque_image_area(const QString& path)
|
||||
{
|
||||
QImage image = QImage(path);
|
||||
|
||||
int w_min = 0;
|
||||
int w_max = image.width();
|
||||
int h_min = 0;
|
||||
int h_max = image.height();
|
||||
|
||||
for (int y = 0; y < image.height(); ++y)
|
||||
{
|
||||
const QRgb* row = reinterpret_cast<const QRgb*>(image.constScanLine(y));
|
||||
bool row_filled = false;
|
||||
|
||||
for (int x = 0; x < image.width(); ++x)
|
||||
{
|
||||
if (qAlpha(row[x]))
|
||||
{
|
||||
row_filled = true;
|
||||
w_min = std::max(w_min, x);
|
||||
|
||||
if (w_max > x)
|
||||
{
|
||||
w_max = x;
|
||||
x = w_min;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (row_filled)
|
||||
{
|
||||
h_max = std::min(h_max, y);
|
||||
h_min = y;
|
||||
}
|
||||
}
|
||||
|
||||
return image.copy(QRect(QPoint(w_max, h_max), QPoint(w_min, h_min)));
|
||||
}
|
||||
|
||||
// taken from https://stackoverflow.com/a/30818424/8353754
|
||||
// because size policies won't work as expected (see similar bugs in Qt bugtracker)
|
||||
void resize_combo_box_view(QComboBox* combo)
|
||||
|
||||
@ -132,9 +132,6 @@ namespace gui
|
||||
// Returns a scaled, aligned QPixmap
|
||||
QPixmap get_aligned_pixmap(const QString& path, const QSize& icon_size, qreal device_pixel_ratio, Qt::TransformationMode mode, align_h h_alignment, align_v v_alignment);
|
||||
|
||||
// Returns the part of the image loaded from path that is inside the bounding box of its opaque areas
|
||||
QImage get_opaque_image_area(const QString& path);
|
||||
|
||||
// Workaround: resize the dropdown combobox items
|
||||
void resize_combo_box_view(QComboBox* combo);
|
||||
|
||||
|
||||
@ -24,9 +24,6 @@ namespace gui
|
||||
// main window toolbar icon color
|
||||
"QLabel#toolbar_icon_color { color: #5b5b5b; }"
|
||||
|
||||
// thumbnail icon color
|
||||
"QLabel#thumbnail_icon_color { color: rgba(0, 100, 231, 255); }"
|
||||
|
||||
// game list icon color
|
||||
"QLabel#gamelist_icon_background_color { color: rgba(240, 240, 240, 255); }"
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user