Skip to content

Commit 9df2fd0

Browse files
committed
Fix the double border issue #130
1 parent d276e81 commit 9df2fd0

File tree

6 files changed

+11
-8
lines changed

6 files changed

+11
-8
lines changed

DSView/pv/dialogs/about.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ About::About(QWidget *parent) :
9898
layout()->addLayout(xlayout);
9999
setTitle(tr("About"));
100100
setFixedWidth(500);
101+
102+
setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint);
101103
}
102104

103105
About::~About()

DSView/pv/dialogs/deviceoptions.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ DeviceOptions::DeviceOptions(QWidget *parent, boost::shared_ptr<pv::device::DevI
8080
connect(&_mode_check, SIGNAL(timeout()), this, SLOT(mode_check()));
8181
_mode_check.setInterval(100);
8282
_mode_check.start();
83+
84+
setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint);
8385
}
8486

8587
void DeviceOptions::accept()

DSView/pv/dialogs/dsdialog.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ DSDialog::DSDialog(QWidget *parent, bool hasClose) :
3636
QDialog(parent),
3737
_moving(false)
3838
{
39-
setWindowFlags(Qt::FramelessWindowHint | Qt::Dialog | Qt::WindowSystemMenuHint |
40-
Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint);
39+
setWindowFlags(Qt::FramelessWindowHint | Qt::Dialog | Qt::WindowSystemMenuHint);
4140
setAttribute(Qt::WA_TranslucentBackground);
4241

4342
build_main(hasClose);

DSView/pv/dialogs/dsmessagebox.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ DSMessageBox::DSMessageBox(QWidget *parent) :
3636
QDialog(parent),
3737
_moving(false)
3838
{
39-
setWindowFlags(Qt::FramelessWindowHint | Qt::Dialog | Qt::WindowSystemMenuHint |
40-
Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint);
39+
setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint | Qt::WindowSystemMenuHint);
4140
setAttribute(Qt::WA_TranslucentBackground);
4241
_main = new QWidget(this);
4342
QVBoxLayout *mlayout = new QVBoxLayout(_main);
@@ -51,8 +50,7 @@ DSMessageBox::DSMessageBox(QWidget *parent) :
5150
_main->setGraphicsEffect(bodyShadow);
5251

5352
_msg = new QMessageBox(this);
54-
_msg->setWindowFlags(Qt::FramelessWindowHint | Qt::Widget | Qt::WindowSystemMenuHint |
55-
Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint);
53+
_msg->setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint | Qt::WindowSystemMenuHint);
5654

5755
_titlebar = new toolbars::TitleBar(false, this);
5856
_titlebar->setTitle(tr("Message"));

DSView/pv/dialogs/fftoptions.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ FftOptions::FftOptions(QWidget *parent, SigSession &session) :
8989
assert(length.size() > 0);
9090
assert(view_modes.size() > 0);
9191
assert(dbv_ranges.size() > 0);
92+
93+
setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint);
94+
9295
for (unsigned int i = 0; i < windows.size(); i++)
9396
{
9497
_window_combobox->addItem(windows[i],

DSView/pv/mainframe.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ MainFrame::MainFrame(DeviceManager &device_manager,
4545
setAttribute(Qt::WA_TranslucentBackground);
4646
// Make this a borderless window which can't
4747
// be resized or moved via the window system
48-
setWindowFlags(Qt::FramelessWindowHint | Qt::WindowSystemMenuHint |
49-
Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint);
48+
setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowSystemMenuHint);
5049
setMinimumHeight(680);
5150
setMinimumWidth(800);
5251
//resize(1024, 768);

0 commit comments

Comments
 (0)