From 1aa71492993b6383714b34a1f31ac052533ef3d3 Mon Sep 17 00:00:00 2001 From: Abdelhak Bougouffa Date: Tue, 27 Mar 2018 21:07:24 +0100 Subject: [PATCH] Fix the double border issue #130 --- DSView/pv/dialogs/about.cpp | 2 ++ DSView/pv/dialogs/deviceoptions.cpp | 2 ++ DSView/pv/dialogs/dsmessagebox.cpp | 6 ++---- DSView/pv/dialogs/fftoptions.cpp | 3 +++ DSView/pv/mainframe.cpp | 3 +-- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/DSView/pv/dialogs/about.cpp b/DSView/pv/dialogs/about.cpp index 3fa497ef..40018af6 100644 --- a/DSView/pv/dialogs/about.cpp +++ b/DSView/pv/dialogs/about.cpp @@ -98,6 +98,8 @@ About::About(QWidget *parent) : layout()->addLayout(xlayout); setTitle(tr("About")); setFixedWidth(500); + + setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint); } About::~About() diff --git a/DSView/pv/dialogs/deviceoptions.cpp b/DSView/pv/dialogs/deviceoptions.cpp index a8471246..6ecd7ba7 100644 --- a/DSView/pv/dialogs/deviceoptions.cpp +++ b/DSView/pv/dialogs/deviceoptions.cpp @@ -80,6 +80,8 @@ DeviceOptions::DeviceOptions(QWidget *parent, boost::shared_ptrsetGraphicsEffect(bodyShadow); _msg = new QMessageBox(this); - _msg->setWindowFlags(Qt::FramelessWindowHint | Qt::Widget | Qt::WindowSystemMenuHint | - Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint); + _msg->setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint | Qt::WindowSystemMenuHint); _titlebar = new toolbars::TitleBar(false, this); _titlebar->setTitle(tr("Message")); diff --git a/DSView/pv/dialogs/fftoptions.cpp b/DSView/pv/dialogs/fftoptions.cpp index 49b8bd56..568874e1 100644 --- a/DSView/pv/dialogs/fftoptions.cpp +++ b/DSView/pv/dialogs/fftoptions.cpp @@ -89,6 +89,9 @@ FftOptions::FftOptions(QWidget *parent, SigSession &session) : assert(length.size() > 0); assert(view_modes.size() > 0); assert(dbv_ranges.size() > 0); + + setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint); + for (unsigned int i = 0; i < windows.size(); i++) { _window_combobox->addItem(windows[i], diff --git a/DSView/pv/mainframe.cpp b/DSView/pv/mainframe.cpp index 4e003094..cd33f118 100644 --- a/DSView/pv/mainframe.cpp +++ b/DSView/pv/mainframe.cpp @@ -45,8 +45,7 @@ MainFrame::MainFrame(DeviceManager &device_manager, setAttribute(Qt::WA_TranslucentBackground); // Make this a borderless window which can't // be resized or moved via the window system - setWindowFlags(Qt::FramelessWindowHint | Qt::WindowSystemMenuHint | - Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint); + setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowSystemMenuHint); setMinimumHeight(680); setMinimumWidth(800); //resize(1024, 768);