diff options
| author | Christoph Berg <christoph.berg@credativ.de> | 2022-08-23 10:23:16 +0200 |
|---|---|---|
| committer | Christoph Berg <christoph.berg@credativ.de> | 2022-08-23 10:23:16 +0200 |
| commit | 2d1068e60bce7ae1fff11623454900e8cee956b1 (patch) | |
| tree | acebe276e30466ef0ab91bc3da5e379bec0d7dc5 /widgets/BandComboBox.cpp | |
| parent | 43bebfbad6e7ba026bd3d55720c7d9e12a7ef8ef (diff) | |
New upstream version 2.6.0~rc3+repackupstream/2.6.0_rc3+repack
Diffstat (limited to 'widgets/BandComboBox.cpp')
| -rwxr-xr-x | widgets/BandComboBox.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/widgets/BandComboBox.cpp b/widgets/BandComboBox.cpp index 0dc8eba6..d75b5b43 100755 --- a/widgets/BandComboBox.cpp +++ b/widgets/BandComboBox.cpp @@ -1,27 +1,27 @@ -#include "BandComboBox.hpp" - -#include <QAbstractItemView> -#include <QScrollBar> -#include <QDebug> -#include "models/FrequencyList.hpp" - -BandComboBox::BandComboBox (QWidget * parent) - : QComboBox {parent} -{ -} - -// Fix up broken QComboBox item view rendering which doesn't allow for -// a vertical scroll bar in width calculations and ends up eliding the -// item text. -void BandComboBox::showPopup () -{ - auto minimum_width = view ()->sizeHintForColumn (FrequencyList_v2::frequency_mhz_column); - if (count () > maxVisibleItems ()) - { - // for some as yet unknown reason, in FT8 mode the scrollbar - // width is oversize on the first call here - minimum_width += view ()->verticalScrollBar ()->width (); - } - view ()->setMinimumWidth (minimum_width); - QComboBox::showPopup (); -} +#include "BandComboBox.hpp"
+
+#include <QAbstractItemView>
+#include <QScrollBar>
+#include <QDebug>
+#include "models/FrequencyList.hpp"
+
+BandComboBox::BandComboBox (QWidget * parent)
+ : QComboBox {parent}
+{
+}
+
+// Fix up broken QComboBox item view rendering which doesn't allow for
+// a vertical scroll bar in width calculations and ends up eliding the
+// item text.
+void BandComboBox::showPopup ()
+{
+ auto minimum_width = view ()->sizeHintForColumn (FrequencyList_v2::frequency_mhz_column);
+ if (count () > maxVisibleItems ())
+ {
+ // for some as yet unknown reason, in FT8 mode the scrollbar
+ // width is oversize on the first call here
+ minimum_width += view ()->verticalScrollBar ()->width ();
+ }
+ view ()->setMinimumWidth (minimum_width);
+ QComboBox::showPopup ();
+}
|
