From: Soeren Apel Date: Sun, 8 Apr 2018 20:33:42 +0000 (+0200) Subject: Channels: Don't use flat buttons and add vertical spacer X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff_plain;h=b887c4d87ee9e5fdf4363c1d46e337485ed83539 Channels: Don't use flat buttons and add vertical spacer With the buttons being flat, users may not recognize the labels as buttons intuitively. Hence, make the buttons explicitly appear as such. To make the dialog more aesthetically pleasing, we add some vertical space between the check boxes and the buttons. --- diff --git a/pv/popups/channels.cpp b/pv/popups/channels.cpp index 585d80df..a24c2651 100644 --- a/pv/popups/channels.cpp +++ b/pv/popups/channels.cpp @@ -19,7 +19,9 @@ #include +#include #include +#include #include #include #include @@ -118,19 +120,13 @@ Channels::Channels(Session &session, QWidget *parent) : connect(&enable_all_changing_channels_, SIGNAL(clicked()), this, SLOT(enable_all_changing_channels())); - enable_all_channels_.setFlat(true); - disable_all_channels_.setFlat(true); - enable_all_logic_channels_.setFlat(true); - enable_all_analog_channels_.setFlat(true); - enable_all_named_channels_.setFlat(true); - enable_all_changing_channels_.setFlat(true); - - buttons_bar_.addWidget(&enable_all_channels_, 0, 0); - buttons_bar_.addWidget(&disable_all_channels_, 0, 1); - buttons_bar_.addWidget(&enable_all_logic_channels_, 1, 0); - buttons_bar_.addWidget(&enable_all_analog_channels_, 1, 1); - buttons_bar_.addWidget(&enable_all_named_channels_, 1, 2); - buttons_bar_.addWidget(&enable_all_changing_channels_, 1, 3); + buttons_bar_.setRowMinimumHeight(0, 2 * QFontMetrics(QApplication::font()).height()); + buttons_bar_.addWidget(&enable_all_channels_, 1, 0); + buttons_bar_.addWidget(&disable_all_channels_, 1, 1); + buttons_bar_.addWidget(&enable_all_logic_channels_, 2, 0); + buttons_bar_.addWidget(&enable_all_analog_channels_, 2, 1); + buttons_bar_.addWidget(&enable_all_named_channels_, 2, 2); + buttons_bar_.addWidget(&enable_all_changing_channels_, 2, 3); layout_.addRow(&buttons_bar_);