From fb5c5a6c6d18c53727d014b7e9e473cea2144be5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Gl=C3=A4=C3=9Fer?= Date: Sun, 12 Jun 2016 18:49:30 +0200 Subject: [PATCH] Fix for Settings Widgets list getting too small in some themes. Small changes (mostly automatically induced by qt-designer). --- src/Embedded_Display/vncview.cpp | 4 +-- src/First_Start_Wizard.cpp | 4 +++ src/Main_Window.cpp | 1 - src/Main_Window.ui | 45 -------------------------------- src/Settings_Widget.cpp | 5 ++++ src/VM_Wizard_Window.ui | 24 ++++++++++++++--- 6 files changed, 31 insertions(+), 52 deletions(-) diff --git a/src/Embedded_Display/vncview.cpp b/src/Embedded_Display/vncview.cpp index 8faef72..bdbd44a 100644 --- a/src/Embedded_Display/vncview.cpp +++ b/src/Embedded_Display/vncview.cpp @@ -502,8 +502,8 @@ void VncView::enterEvent( QEvent* event ) { auto enter = static_cast(event); - int x = enter->globalX(); - int y = enter->globalY(); + //int x = enter->globalX(); + //int y = enter->globalY(); int mx = enter->x(); int my = enter->y(); diff --git a/src/First_Start_Wizard.cpp b/src/First_Start_Wizard.cpp index 26862f7..5b36767 100644 --- a/src/First_Start_Wizard.cpp +++ b/src/First_Start_Wizard.cpp @@ -71,9 +71,13 @@ void First_Start_Wizard::on_Button_Back_clicked() if( ui.All_Pages->currentWidget() == ui.Find_Emulators_Page || ui.All_Pages->currentWidget() == ui.Add_Emulator_Page ) + { ui.All_Pages->setCurrentWidget( ui.General_Settings_Page ); + } else + { ui.All_Pages->setCurrentIndex( ui.All_Pages->currentIndex() -1 ); + } ui.Button_Next->setEnabled( true ); } diff --git a/src/Main_Window.cpp b/src/Main_Window.cpp index 642c400..1fecc0a 100644 --- a/src/Main_Window.cpp +++ b/src/Main_Window.cpp @@ -227,7 +227,6 @@ Main_Window::Main_Window( QWidget *parent ) } } - Settings_Widget::syncGroupIconSizes("Main"); } diff --git a/src/Main_Window.ui b/src/Main_Window.ui index ede8806..783426a 100644 --- a/src/Main_Window.ui +++ b/src/Main_Window.ui @@ -355,9 +355,6 @@ Architecture - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - @@ -371,9 +368,6 @@ CP&Us: - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - CB_CPU_Count @@ -428,9 +422,6 @@ Accelerator: - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - @@ -455,9 +446,6 @@ &Name: - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - Edit_Machine_Name @@ -503,9 +491,6 @@ - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - @@ -519,9 +504,6 @@ &Boot: - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - Qt::LinksAccessibleByMouse @@ -585,9 +567,6 @@ &Graphics: - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - CB_Video_Card @@ -623,9 +602,6 @@ &Keyboard: - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - CB_Keyboard_Layout @@ -1463,9 +1439,6 @@ &Kernel bzImage file: - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - Edit_Linux_bzImage_Path @@ -1489,9 +1462,6 @@ &Initrd file: - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - Edit_Linux_Initrd_Path @@ -1505,9 +1475,6 @@ A&ppend command line: - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - Edit_Linux_Command_Line @@ -1956,9 +1923,6 @@ For Connection Use Port 5900 + VNC Display Number - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - 1 @@ -2880,9 +2844,6 @@ TFTP folder: - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - Edit_TFTP_Prefix @@ -2903,9 +2864,6 @@ Allow &SMB access to: - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - Edit_SMB_Folder @@ -3004,9 +2962,6 @@ - - Qt::AlignCenter - diff --git a/src/Settings_Widget.cpp b/src/Settings_Widget.cpp index 7cc17a9..bf11064 100644 --- a/src/Settings_Widget.cpp +++ b/src/Settings_Widget.cpp @@ -228,6 +228,11 @@ void Settings_Widget::syncGroupIconSizes(QString g) min_total_list_width += max_width.at(j) +5; } + if ( max_list_height > 0 && max_list_height <= 58 ) + { + max_list_height = 68; + } + //then apply max_width to all for( int i = 0; i < list.count(); i++ ) { diff --git a/src/VM_Wizard_Window.ui b/src/VM_Wizard_Window.ui index dc7f663..fa8b46a 100644 --- a/src/VM_Wizard_Window.ui +++ b/src/VM_Wizard_Window.ui @@ -166,7 +166,7 @@ - 3 + 7 @@ -678,7 +678,15 @@ 1 - + + + + 0 + 0 + 108 + 380 + + TCG (for Tiny Code Generator) @@ -707,7 +715,15 @@ - + + + + 0 + 0 + 578 + 122 + + KVM (for Kernel-based Virtual Machine) @@ -759,7 +775,7 @@ - TCG (Choose this if the &guest or host isn't x86) + TCG (Choose this if the guest or host isn't &x86)