Qt: implement flow layout game grid

This will allow us to properly style the grid and also remove the need to refresh the whole grid on a window resize
This commit is contained in:
Megamouse 2023-04-28 16:09:08 +02:00
parent 0b628cb50e
commit f115032095
48 changed files with 2563 additions and 1601 deletions

View file

@ -43,20 +43,6 @@ QLabel#gamelist_icon_background_color {
color: rgba(209,209,209,255);
}
/* game grid stylesheet */
QTableWidget#game_grid {
font-weight:600;
font-size:8pt;
font-family:Lucida Grande;
color: rgba(51,51,51,255);
}
QTableWidget#game_grid::item:selected:active {
selection-background-color: #0078D7;
}
QTableWidget#game_grid::item:selected:!active {
selection-background-color: #008cff;
}
/* log stylesheet */
QTextEdit#tty_frame {
background-color:#ffffff;
@ -131,3 +117,33 @@ QLabel#rsx_debugger_display_buffer {
QLabel#l_controller {
color:#434343;
}
/* Game Grid */
#game_list_grid_item[selected="true"] {
background: #0078D7;
}
#game_list_grid_item:hover {
background: #008cff;
}
#game_list_grid_item:focus {
background: #0078D7;
}
/* Game Grid Font */
#game_list_grid_item #game_list_grid_item_title_label {
font-weight: 600;
font-size: 8pt;
font-family: Lucida Grande;
color: rgba(51,51,51,255);
}
/* Game Grid hover and focus: we need to handle properties differently when using descendants */
#game_list_grid_item[selected="true"] #game_list_grid_item_title_label {
color: #fff;
}
#game_list_grid_item[hover="true"] #game_list_grid_item_title_label {
color: #fff;
}
#game_list_grid_item[focus="true"] #game_list_grid_item_title_label {
color: #fff;
}

View file

@ -197,17 +197,6 @@ QLabel#l_controller {
color: #FFF;
}
/* Game Grid Font */
QTableWidget#game_grid {
font-weight: 600;
font-size: 8pt;
font-family: Lucida Grande;
color: #FFF;
}
QTableWidget#game_grid::item:selected:!active {
selection-background-color: #313f4e;
}
/* Slider on toolbar */
QWidget#sizeSliderContainer {
background: transparent;
@ -344,24 +333,54 @@ QLabel#debugger_frame_pc {
/* Tree view changes*/
QTreeView::branch:has-children:!has-siblings:closed,
QTreeView::branch:closed:has-children:has-siblings {
border-image: none;
image: url("GuiConfigs/list_arrow_white.png");
border-image: none;
image: url("GuiConfigs/list_arrow_white.png");
}
QTreeView::branch:open:has-children:!has-siblings,
QTreeView::branch:open:has-children:has-siblings {
border-image: none;
image: url("GuiConfigs/list_arrow_down_white.png");
QTreeView::branch:open:has-children:has-siblings {
border-image: none;
image: url("GuiConfigs/list_arrow_down_white.png");
}
QTreeView::branch:has-children:!has-siblings:closed:hover,
QTreeView::branch:closed:has-children:has-siblings:hover {
border-image: none;
image: url("GuiConfigs/list_arrow_blue.png");
border-image: none;
image: url("GuiConfigs/list_arrow_blue.png");
}
QTreeView::branch:open:has-children:!has-siblings:hover,
QTreeView::branch:open:has-children:has-siblings:hover {
border-image: none;
image: url("GuiConfigs/list_arrow_down_blue.png");
QTreeView::branch:open:has-children:has-siblings:hover {
border-image: none;
image: url("GuiConfigs/list_arrow_down_blue.png");
}
/* Game Grid */
#game_list_grid_item[selected="true"] {
background: #313f4e;
}
#game_list_grid_item:hover {
background: #313f4e;
}
#game_list_grid_item:focus {
background: #0078D7;
}
/* Game Grid Font */
#game_list_grid_item #game_list_grid_item_title_label {
font-weight: 600;
font-size: 8pt;
font-family: Lucida Grande;
color: #FFF;
}
/* Game Grid hover and focus: we need to handle properties differently when using descendants */
#game_list_grid_item[selected="true"] #game_list_grid_item_title_label {
background-color: #313f4e;
}
#game_list_grid_item[hover="true"] #game_list_grid_item_title_label {
background-color: #313f4e;
}
#game_list_grid_item[focus="true"] #game_list_grid_item_title_label {
background-color: #0078D7;
}

View file

@ -454,7 +454,7 @@ QListWidget::item:selected {
}
QListWidget::item:hover {
background-color: #30333a;
background-color: #30333a;
color: #8cf944;
border-radius: 0.25em;
}
@ -565,7 +565,7 @@ QTableView {
}
QTableView::item:hover {
color: #8cf944;
color: #8cf944;
}
/* Game Icon Background */
@ -641,24 +641,42 @@ QLabel#debugger_frame_pc {
/* Tree view changes*/
QTreeView::branch:has-children:!has-siblings:closed,
QTreeView::branch:closed:has-children:has-siblings {
border-image: none;
image: url("GuiConfigs/list_arrow_white.png");
border-image: none;
image: url("GuiConfigs/list_arrow_white.png");
}
QTreeView::branch:open:has-children:!has-siblings,
QTreeView::branch:open:has-children:has-siblings {
border-image: none;
image: url("GuiConfigs/list_arrow_down_white.png");
QTreeView::branch:open:has-children:has-siblings {
border-image: none;
image: url("GuiConfigs/list_arrow_down_white.png");
}
QTreeView::branch:has-children:!has-siblings:closed:hover,
QTreeView::branch:closed:has-children:has-siblings:hover {
border-image: none;
image: url("GuiConfigs/list_arrow_green.png");
border-image: none;
image: url("GuiConfigs/list_arrow_green.png");
}
QTreeView::branch:open:has-children:!has-siblings:hover,
QTreeView::branch:open:has-children:has-siblings:hover {
border-image: none;
image: url("GuiConfigs/list_arrow_down_green.png");
QTreeView::branch:open:has-children:has-siblings:hover {
border-image: none;
image: url("GuiConfigs/list_arrow_down_green.png");
}
/* Game Grid */
#game_list_grid_item[selected="true"] {
background: #2d3038;
}
#game_list_grid_item:focus {
background: #2d3038;
}
/* Game Grid hover and focus: we need to handle properties differently when using descendants */
#game_list_grid_item[selected="true"] #game_list_grid_item_title_label {
background-color: #2d3038;
color: #8cf944;
}
#game_list_grid_item[focus="true"] #game_list_grid_item_title_label {
background-color: #2d3038;
color: #8cf944;
}

View file

@ -249,20 +249,6 @@ QWidget#trophy_notification_frame {
color: #e6e6e6;
}
/* Game Grid Font */
QTableWidget#game_grid {
font-weight: 600;
font-size: 8pt;
font-family: Lucida Grande;
selection-color: #e6e6e6;
}
QTableWidget#game_grid::item:selected:active {
selection-background-color: #4c4b4b;
}
QTableWidget#game_grid::item:selected:!active {
selection-background-color: #3d3d3d;
}
/* Set Toolbar Slider Size */
QSlider#sizeSlider::groove:horizontal {
border: 0em solid transparent;
@ -347,24 +333,54 @@ QLabel#tty_text {
/* Tree view changes*/
QTreeView::branch:has-children:!has-siblings:closed,
QTreeView::branch:closed:has-children:has-siblings {
border-image: none;
image: url("GuiConfigs/list_arrow_white.png");
border-image: none;
image: url("GuiConfigs/list_arrow_white.png");
}
QTreeView::branch:open:has-children:!has-siblings,
QTreeView::branch:open:has-children:has-siblings {
border-image: none;
image: url("GuiConfigs/list_arrow_down_white.png");
QTreeView::branch:open:has-children:has-siblings {
border-image: none;
image: url("GuiConfigs/list_arrow_down_white.png");
}
QTreeView::branch:has-children:!has-siblings:closed:hover,
QTreeView::branch:closed:has-children:has-siblings:hover {
border-image: none;
image: url("GuiConfigs/list_arrow_blue.png");
border-image: none;
image: url("GuiConfigs/list_arrow_blue.png");
}
QTreeView::branch:open:has-children:!has-siblings:hover,
QTreeView::branch:open:has-children:has-siblings:hover {
border-image: none;
image: url("GuiConfigs/list_arrow_down_blue.png");
QTreeView::branch:open:has-children:has-siblings:hover {
border-image: none;
image: url("GuiConfigs/list_arrow_down_blue.png");
}
/* Game Grid */
#game_list_grid_item[selected="true"] {
background: #3d3d3d;
}
#game_list_grid_item:hover {
background: #3d3d3d;
}
#game_list_grid_item:focus {
background: #4c4b4b;
}
/* Game Grid Font */
#game_list_grid_item #game_list_grid_item_title_label {
font-weight: 600;
font-size: 8pt;
font-family: Lucida Grande;
}
/* Game Grid hover and focus: we need to handle properties differently when using descendants */
#game_list_grid_item[selected="true"] #game_list_grid_item_title_label {
background-color: #3d3d3d;
}
#game_list_grid_item[hover="true"] #game_list_grid_item_title_label {
background-color: #3d3d3d;
}
#game_list_grid_item[focus="true"] #game_list_grid_item_title_label {
color: #e6e6e6;
background-color: #4c4b4b;
}

View file

@ -194,17 +194,6 @@ QLabel#l_controller {
color: #fff;
}
/* Game Grid Font */
QTableWidget#game_grid {
font-weight: 600;
font-size: 8pt;
font-family: Lucida Grande;
color: #fff;
}
QTableWidget#game_grid::item:selected:!active {
selection-background-color: #354454;
}
/* Slider on toolbar */
QWidget#sizeSliderContainer {
background: transparent;
@ -341,24 +330,54 @@ QLabel#debugger_frame_pc {
/* Tree view changes*/
QTreeView::branch:has-children:!has-siblings:closed,
QTreeView::branch:closed:has-children:has-siblings {
border-image: none;
image: url("GuiConfigs/list_arrow_white.png");
border-image: none;
image: url("GuiConfigs/list_arrow_white.png");
}
QTreeView::branch:open:has-children:!has-siblings,
QTreeView::branch:open:has-children:has-siblings {
border-image: none;
image: url("GuiConfigs/list_arrow_down_white.png");
QTreeView::branch:open:has-children:has-siblings {
border-image: none;
image: url("GuiConfigs/list_arrow_down_white.png");
}
QTreeView::branch:has-children:!has-siblings:closed:hover,
QTreeView::branch:closed:has-children:has-siblings:hover {
border-image: none;
image: url("GuiConfigs/list_arrow_blue.png");
border-image: none;
image: url("GuiConfigs/list_arrow_blue.png");
}
QTreeView::branch:open:has-children:!has-siblings:hover,
QTreeView::branch:open:has-children:has-siblings:hover {
border-image: none;
image: url("GuiConfigs/list_arrow_down_blue.png");
QTreeView::branch:open:has-children:has-siblings:hover {
border-image: none;
image: url("GuiConfigs/list_arrow_down_blue.png");
}
/* Game Grid */
#game_list_grid_item[selected="true"] {
background: #354454;
}
#game_list_grid_item:hover {
background: #354454;
}
#game_list_grid_item:focus {
background: #0078D7;
}
/* Game Grid Font */
#game_list_grid_item #game_list_grid_item_title_label {
font-weight: 600;
font-size: 8pt;
font-family: Lucida Grande;
color: #FFF;
}
/* Game Grid hover and focus: we need to handle properties differently when using descendants */
#game_list_grid_item[selected="true"] #game_list_grid_item_title_label {
background-color: #354454;
}
#game_list_grid_item[hover="true"] #game_list_grid_item_title_label {
background-color: #354454;
}
#game_list_grid_item[focus="true"] #game_list_grid_item_title_label {
background-color: #0078D7;
}

View file

@ -367,21 +367,6 @@ QLabel#l_controller {
}
/* Game Grid Font */
QTableWidget#game_grid {
font-weight: 600;
color: #ffd785;
text-transform: uppercase;
selection-color: #ffd785;
}
QTableWidget#game_grid::item:selected:active {
selection-background-color: #4d4940;
}
QTableWidget#game_grid::item:selected:!active {
selection-background-color: #615c51;
}
/* Debug UI Settings buttons */
QLabel#color_button {
background: transparent;
@ -489,3 +474,33 @@ QWidget#trophy_notification_frame {
background-color: #b3ac98;
color: #4d4940;
}
/* Game Grid */
#game_list_grid_item[selected="true"] {
background: #615c51;
}
#game_list_grid_item:hover {
background: #615c51;
}
#game_list_grid_item:focus {
background: #4d4940;
}
/* Game Grid Font */
#game_list_grid_item #game_list_grid_item_title_label {
font-weight: 600;
text-transform: uppercase;
color: #ffd785;
}
/* Game Grid hover and focus: we need to handle properties differently when using descendants */
#game_list_grid_item[selected="true"] #game_list_grid_item_title_label {
background-color: #615c51;
}
#game_list_grid_item[hover="true"] #game_list_grid_item_title_label {
background-color: #615c51;
}
#game_list_grid_item[focus="true"] #game_list_grid_item_title_label {
background-color: #4d4940;
color: #ffd785;
}

View file

@ -220,6 +220,17 @@ QScrollBar::up-arrow, QScrollBar::down-arrow, QScrollBar::up-button:vertical, QS
border: none;
}
#game_list_grid QScrollBar {
width: 10px;
height: 3px;
}
#game_list_grid QScrollBar::handle {
background: #1c273d;
}
#game_list_grid QScrollBar::handle:hover, QScrollBar::handle:pressed {
background: #0074e7;
}
/* Radio Buttons */
QRadioButton::indicator {
border: 0.0625em solid #455971;
@ -663,24 +674,49 @@ QLabel#debugger_frame_pc {
/* Tree view changes*/
QTreeView::branch:has-children:!has-siblings:closed,
QTreeView::branch:closed:has-children:has-siblings {
border-image: none;
image: url("GuiConfigs/list_arrow_white.png");
border-image: none;
image: url("GuiConfigs/list_arrow_white.png");
}
QTreeView::branch:open:has-children:!has-siblings,
QTreeView::branch:open:has-children:has-siblings {
border-image: none;
image: url("GuiConfigs/list_arrow_down_white.png");
QTreeView::branch:open:has-children:has-siblings {
border-image: none;
image: url("GuiConfigs/list_arrow_down_white.png");
}
QTreeView::branch:has-children:!has-siblings:closed:hover,
QTreeView::branch:closed:has-children:has-siblings:hover {
border-image: none;
image: url("GuiConfigs/list_arrow_blue.png");
border-image: none;
image: url("GuiConfigs/list_arrow_blue.png");
}
QTreeView::branch:open:has-children:!has-siblings:hover,
QTreeView::branch:open:has-children:has-siblings:hover {
border-image: none;
image: url("GuiConfigs/list_arrow_down_blue.png");
QTreeView::branch:open:has-children:has-siblings:hover {
border-image: none;
image: url("GuiConfigs/list_arrow_down_blue.png");
}
/* Game Grid */
#game_list_grid_item[selected="true"] {
background: #0f1d36;
}
#game_list_grid_item:focus {
background: #0f1d36;
}
#game_list_grid_item #game_list_grid_item_title_label {
color: #FFFFFF;
}
/* Game Grid hover and focus: we need to handle properties differently when using descendants */
#game_list_grid_item[selected="true"] #game_list_grid_item_title_label {
background-color: #0f1d36;
color: #2397ff;
}
#game_list_grid_item[hover="true"] #game_list_grid_item_title_label {
color: #2397ff;
}
#game_list_grid_item[focus="true"] #game_list_grid_item_title_label {
background-color: #0f1d36;
color: #2397ff;
}

View file

@ -678,3 +678,24 @@ QLabel#debugger_frame_pc {
color: #000; /* Font Color: Black */
background-color: #00ff00; /* Green */
}
/* Game Grid */
#game_list_grid_item[selected="true"] {
background: #4343c1;
}
#game_list_grid_item:focus {
background: #4343c1;
}
/* Game Grid hover and focus: we need to handle properties differently when using descendants */
#game_list_grid_item[selected="true"] #game_list_grid_item_title_label {
background-color: #4343c1;
color: #FFF;
}
#game_list_grid_item[hover="true"] #game_list_grid_item_title_label {
color: #4343c1;
}
#game_list_grid_item[focus="true"] #game_list_grid_item_title_label {
background-color: #4343c1;
color: #FFF;
}

View file

@ -358,14 +358,6 @@ QLabel#l_controller {
color: #4d4940;
}
/* Game Grid Font */
QTableWidget#game_grid {
font-weight: 600;
color: #4d4940;
text-transform: uppercase;
selection-color: #aea993;
}
/* Debug UI Settings buttons */
QLabel#color_button {
background: transparent;
@ -463,3 +455,26 @@ QSlider#sizeSlider::groove:horizontal {
QLabel#validLabel {
font-weight: 600;
}
/* Game Grid */
#game_list_grid_item[selected="true"] {
background: #4d4940;
}
#game_list_grid_item:focus {
background: #4d4940;
}
/* Game Grid Font */
#game_list_grid_item #game_list_grid_item_title_label {
font-weight: 600;
color: #4d4940;
text-transform: uppercase;
}
/* Game Grid hover and focus: we need to handle properties differently when using descendants */
#game_list_grid_item[selected="true"] #game_list_grid_item_title_label {
color: #aea993;
}
#game_list_grid_item[focus="true"] #game_list_grid_item_title_label {
color: #aea993;
}