diff --git a/src/device/deviceviewcontainer.cpp b/src/device/deviceviewcontainer.cpp index 0ddad6169..56f23fab3 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 8e6b88261..82ee7203f 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 7689365da..2d87982df 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 - - - - +