Compare commits

..

3 Commits

Author SHA1 Message Date
cristian64
25c24e2363
Merge 068ab1df2e into 033a0540f7 2025-08-31 11:07:37 +01:00
cristian64
068ab1df2e DolphinQt: Use vertical tabs in Hotkey Settings dialog.
At this time, only the **Hotkey Settings** dialog will use vertical
tabs. This dialog happens to feature many tabs that, when horizontal
tabs are used, require horizontal scroll. Also, with these many tabs,
it can make good use of the vertical space that the vertical tabs
require.

| Before | After |
| ------ | ----- |
| <img width="918" height="679" alt="[Dolphin Emulator] Hotkey Settings dialog" title="[Dolphin Emulator] Hotkey Settings dialog" src="https://github.com/user-attachments/assets/7c9d9964-f36b-4872-ab52-6ebbe974a8ca" /> | <img width="1041" height="653" alt="[Dolphin Emulator] Hotkey Settings dialog with vertical tabs" title="[Dolphin Emulator] Hotkey Settings dialog with vertical tabs" src="https://github.com/user-attachments/assets/c6d875f9-f52d-4564-9d68-0555521a77fa" /> |
2025-08-31 11:06:54 +01:00
cristian64
42eea4073e DolphinQt: Add tab widget with vertical tabs.
The new `VerticalTabsTabWidget` class extends `QTabWidget`, with a
custom tab bar that paint tabs with a _west_ orientation and
_horizontal_ text labels.
2025-08-31 11:06:54 +01:00

View File

@ -32,16 +32,16 @@ protected:
for (int i{0}; i < tab_count; ++i) for (int i{0}; i < tab_count; ++i)
{ {
if (i != current_tab_index) if (i != current_tab_index)
paintTab(painter, i); PaintTab(painter, i);
} }
// Current tab is painted last as, depending on the [system] style, it is possible that the // Current tab is painted last as, depending on the [system] style, it is possible that the
// decoration is required to occlude the adjacent tab underneath. // decoration is required to occlude the adjacent tab underneath.
paintTab(painter, current_tab_index); PaintTab(painter, current_tab_index);
} }
private: private:
void paintTab(QStylePainter& painter, const int tab_index) void PaintTab(QStylePainter& painter, const int tab_index)
{ {
painter.save(); painter.save();