From f5ba8da3c72bf830ce1a974d3388f6c5595b8e71 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Thu, 9 Aug 2018 22:30:18 +0200 Subject: [PATCH] Remove info frame from DeviceViewContainer Was broken and caused yellow background on windows --- src/device/deviceviewcontainer.cpp | 36 +------------------ src/device/deviceviewcontainer.h | 11 ++---- src/device/deviceviewcontainer.ui | 56 +----------------------------- 3 files changed, 5 insertions(+), 98 deletions(-) diff --git a/src/device/deviceviewcontainer.cpp b/src/device/deviceviewcontainer.cpp index 0ddad616..56f23fab 100644 --- a/src/device/deviceviewcontainer.cpp +++ b/src/device/deviceviewcontainer.cpp @@ -22,48 +22,14 @@ #include #include -#include -#include -#include -#include -#include -#include -#include - -#include "core/iconloader.h" #include "deviceviewcontainer.h" #include "ui_deviceviewcontainer.h" -DeviceViewContainer::DeviceViewContainer(QWidget *parent) : QWidget(parent), ui_(new Ui::DeviceViewContainer), loaded_icons_(false) { - +DeviceViewContainer::DeviceViewContainer(QWidget *parent) : QWidget(parent), ui_(new Ui_DeviceViewContainer) { ui_->setupUi(this); - - QPalette palette(ui_->windows_is_broken_frame->palette()); - palette.setColor(QPalette::Background, QColor(255, 255, 222)); - ui_->windows_is_broken_frame->setPalette(palette); - -#ifdef Q_OS_WIN - ui_->windows_is_broken_frame->show(); -#else - ui_->windows_is_broken_frame->hide(); -#endif - } DeviceViewContainer::~DeviceViewContainer() { delete ui_; } -void DeviceViewContainer::showEvent(QShowEvent *e) { - - if (!loaded_icons_) { - loaded_icons_ = true; - - ui_->close_frame_button->setIcon(IconLoader::Load("edit-delete")); - ui_->warning_icon->setPixmap(IconLoader::Load("dialog-warning").pixmap(22)); - } - - QWidget::showEvent(e); - -} - DeviceView *DeviceViewContainer::view() const { return ui_->view; } diff --git a/src/device/deviceviewcontainer.h b/src/device/deviceviewcontainer.h index 8e6b8826..82ee7203 100644 --- a/src/device/deviceviewcontainer.h +++ b/src/device/deviceviewcontainer.h @@ -30,11 +30,8 @@ #include #include -namespace Ui { -class DeviceViewContainer; -} - class DeviceView; +class Ui_DeviceViewContainer; class DeviceViewContainer : public QWidget { Q_OBJECT @@ -43,14 +40,12 @@ class DeviceViewContainer : public QWidget { explicit DeviceViewContainer(QWidget *parent = nullptr); ~DeviceViewContainer(); - DeviceView* view() const; + DeviceView *view() const; protected: - void showEvent(QShowEvent *); private: - Ui::DeviceViewContainer *ui_; - bool loaded_icons_; + Ui_DeviceViewContainer *ui_; }; #endif // DEVICEVIEWCONTAINER_H diff --git a/src/device/deviceviewcontainer.ui b/src/device/deviceviewcontainer.ui index 7689365d..2d87982d 100644 --- a/src/device/deviceviewcontainer.ui +++ b/src/device/deviceviewcontainer.ui @@ -29,43 +29,6 @@ 0 - - - - true - - - QFrame::StyledPanel - - - QFrame::Raised - - - - - - - - - - 0 - 0 - - - - iPods and USB devices currently don't work on Windows. Sorry! - - - true - - - - - - - - - @@ -87,22 +50,5 @@ - - - close_frame_button - clicked() - windows_is_broken_frame - hide() - - - 362 - 31 - - - 369 - 40 - - - - +