Commit eb9a51b0b4a63e82886a336981d24cec308f2ef5

Authored by Charles Otto
1 parent 15336a59

Enforce a minimum window size in Show to avoid warnings in windows

Showing 1 changed file with 8 additions and 1 deletions
openbr/plugins/gui.cpp
... ... @@ -70,6 +70,7 @@ public:
70 70  
71 71 DisplayWindow(QWidget * parent = NULL) : QLabel(parent)
72 72 {
  73 + setFixedSize(200,200);
73 74 QApplication::instance()->installEventFilter(this);
74 75 }
75 76  
... ... @@ -80,7 +81,13 @@ public slots:
80 81  
81 82 show();
82 83 setPixmap(pixmap);
83   - setFixedSize(input.size());
  84 +
  85 + // We appear to get a warning on windows if we set window width < 104. This is of course not
  86 + // reflected in the Qt min size settings, and I don't know how to query it.
  87 + QSize temp = input.size();
  88 + if (temp.width() < 104)
  89 + temp.setWidth(104);
  90 + setFixedSize(temp);
84 91 }
85 92  
86 93  
... ...