Skip to content

Commit afba5bb

Browse files
committed
Merge pull request #14 from openivimobility/fix/grey-border
Fix 'grey pixels on right edge' bug
2 parents 55e361a + 86d573b commit afba5bb

File tree

2 files changed

+16
-77
lines changed

2 files changed

+16
-77
lines changed

mainwindow.cc

+1-15
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ MainWindow::MainWindow(QWidget *parent, const QUrl &force_url)
3030
SLOT(OpenUrlDialog()));
3131
connect(ui_->action_Quit, SIGNAL(triggered()), qApp, SLOT(quit()));
3232

33-
// 'Simulation' buttons
34-
connect(ui_->fullscreen_, SIGNAL(clicked()), this, SLOT(ToggleFullScreen()));
33+
connect(ui_->action_Full_Screen, SIGNAL(triggered()), this, SLOT(ToggleFullScreen()));
3534

3635
if (force_url.isEmpty()) {
3736
QSettings settings;
@@ -60,24 +59,11 @@ void MainWindow::ToggleFullScreen() {
6059
bool shownhide;
6160
if (isFullScreen()) {
6261
setWindowState(Qt::WindowNoState);
63-
// setCentralWidget(ui_->centralWidget);
6462
shownhide = true;
6563
} else {
6664
setWindowState(Qt::WindowFullScreen);
6765
shownhide = false;
6866
}
69-
// Hide everything on the left hand layout
70-
int children = ui_->simcontrols_->count();
71-
for (int i = 0; i < children; i++) {
72-
QWidget *w = ui_->simcontrols_->itemAt(i)->widget();
73-
if (w) {
74-
if (shownhide) {
75-
w->show();
76-
} else {
77-
w->hide();
78-
}
79-
}
80-
}
8167
if (shownhide) {
8268
ui_->menuBar_->show();
8369
ui_->statusBar_->show();

mainwindow.ui

+15-62
Original file line numberDiff line numberDiff line change
@@ -52,68 +52,6 @@
5252
</property>
5353
</widget>
5454
</item>
55-
<item>
56-
<layout class="QVBoxLayout" name="simcontrols_">
57-
<property name="spacing">
58-
<number>0</number>
59-
</property>
60-
<property name="topMargin">
61-
<number>0</number>
62-
</property>
63-
<property name="rightMargin">
64-
<number>0</number>
65-
</property>
66-
<property name="bottomMargin">
67-
<number>0</number>
68-
</property>
69-
<item>
70-
<widget class="QPushButton" name="pushButton">
71-
<property name="text">
72-
<string>Geolocate Berlin</string>
73-
</property>
74-
</widget>
75-
</item>
76-
<item>
77-
<widget class="QPushButton" name="pushButton_2">
78-
<property name="text">
79-
<string>Geolocate Paris</string>
80-
</property>
81-
</widget>
82-
</item>
83-
<item>
84-
<spacer name="verticalSpacer">
85-
<property name="orientation">
86-
<enum>Qt::Vertical</enum>
87-
</property>
88-
<property name="sizeHint" stdset="0">
89-
<size>
90-
<width>20</width>
91-
<height>40</height>
92-
</size>
93-
</property>
94-
</spacer>
95-
</item>
96-
<item>
97-
<widget class="QPushButton" name="fullscreen_">
98-
<property name="toolTip">
99-
<string>Display the window in full screen (F11)</string>
100-
</property>
101-
<property name="text">
102-
<string>Full Screen</string>
103-
</property>
104-
<property name="autoDefault">
105-
<bool>false</bool>
106-
</property>
107-
<property name="default">
108-
<bool>false</bool>
109-
</property>
110-
<property name="flat">
111-
<bool>false</bool>
112-
</property>
113-
</widget>
114-
</item>
115-
</layout>
116-
</item>
11755
</layout>
11856
</widget>
11957
<widget class="QMenuBar" name="menuBar_">
@@ -133,7 +71,14 @@
13371
<addaction name="separator"/>
13472
<addaction name="action_Quit"/>
13573
</widget>
74+
<widget class="QMenu" name="menu_Window">
75+
<property name="title">
76+
<string>&amp;Window</string>
77+
</property>
78+
<addaction name="action_Full_Screen"/>
79+
</widget>
13680
<addaction name="menu_File"/>
81+
<addaction name="menu_Window"/>
13782
</widget>
13883
<widget class="QStatusBar" name="statusBar_"/>
13984
<action name="action_Quit">
@@ -146,6 +91,14 @@
14691
<string>&amp;Open File...</string>
14792
</property>
14893
</action>
94+
<action name="action_Full_Screen">
95+
<property name="text">
96+
<string>&amp;Full Screen (F11)</string>
97+
</property>
98+
<property name="iconText">
99+
<string>Full Screen</string>
100+
</property>
101+
</action>
149102
</widget>
150103
<layoutdefault spacing="6" margin="11"/>
151104
<customwidgets>

0 commit comments

Comments
 (0)