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
+46 -10
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;
}