mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-12 22:39:09 -05:00
Fixed problem with 2 monitors scaling in portrait configuration
This commit is contained in:
@@ -22,7 +22,7 @@ class MonitorBox : public QWidget
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit MonitorBox(QRect widgetDims, std::vector<QRect> monitorResolution,
|
||||
unsigned int nWindows, bool showMonitorLabel, QString* winColors);
|
||||
unsigned int nWindows, QString* winColors);
|
||||
~MonitorBox();
|
||||
void mapMonitorResolutionToWidgetCoordinates();
|
||||
void mapWindowResolutionToWidgetCoordinates(unsigned int mIdx, unsigned int wIdx,
|
||||
|
||||
@@ -43,10 +43,9 @@ private:
|
||||
QVBoxLayout* _displayLayout = nullptr;
|
||||
QFrame* _displayFrame = nullptr;
|
||||
Display* _displayWidget = nullptr;
|
||||
QRect _monitorWidgetSize = {0, 0, 400, 350};
|
||||
QRect _monitorWidgetSize = {0, 0, 500, 500};
|
||||
FileSupport* _fileSupportWidget = nullptr;
|
||||
Orientation* _orientationWidget = nullptr;
|
||||
bool _showMonitorLabel = false;
|
||||
sgct::config::Cluster& _cluster;
|
||||
std::vector<sgct::config::Window>& _windowList;
|
||||
bool _saveSelected = false;
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
|
||||
|
||||
MonitorBox::MonitorBox(QRect widgetDims, std::vector<QRect> monitorResolution,
|
||||
unsigned int nWindows, bool showMonitorLabel, QString* winColors)
|
||||
unsigned int nWindows, QString* winColors)
|
||||
: _monitorWidgetSize(widgetDims)
|
||||
, _monitorResolution(monitorResolution)
|
||||
, _nWindows(nWindows)
|
||||
, _showLabel(showMonitorLabel)
|
||||
, _colorsForWindows(winColors)
|
||||
{
|
||||
_nMonitors = monitorResolution.size();
|
||||
_showLabel = (_nMonitors > 1);
|
||||
mapMonitorResolutionToWidgetCoordinates();
|
||||
}
|
||||
|
||||
|
||||
@@ -44,17 +44,11 @@ void SgctEdit::createWidgets() {
|
||||
QHBoxLayout* layoutMainH = new QHBoxLayout;
|
||||
_orientationWidget = new Orientation();
|
||||
|
||||
if (_monitorSizeList.size() > 1) {
|
||||
_monitorWidgetSize = QRect(0, 0, 600, 350);
|
||||
_showMonitorLabel = true;
|
||||
}
|
||||
|
||||
{
|
||||
_monBox = new MonitorBox(
|
||||
_monitorWidgetSize,
|
||||
_monitorSizeList,
|
||||
_nMaxWindows,
|
||||
_showMonitorLabel,
|
||||
_colorsForWindows
|
||||
);
|
||||
QHBoxLayout* layoutMonBox = new QHBoxLayout();
|
||||
|
||||
Reference in New Issue
Block a user