mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 23:25:53 +08:00
refs #335, style sheet fixes / improvements and support methods
style sheets: * style sheets with background textures * scroll area / toolbox style sheet fix * floating dock widgets * kept 1st version of stylesheets in backup directory * removed maininfoarea stylesheet, no longer needed with fixed style sheet code * central paintEvent method to enable style sheets in derived widgets * detect frameless windows, dynamic properties
This commit is contained in:
committed by
Roland Winklmeier
parent
65c2ed9db4
commit
c965fbb785
@@ -9,6 +9,7 @@
|
||||
|
||||
#include "infowindowcomponent.h"
|
||||
#include "ui_infowindowcomponent.h"
|
||||
#include "../stylesheetutility.h"
|
||||
#include "blackmisc/icon.h"
|
||||
#include <QTimer>
|
||||
#include <QDesktopWidget>
|
||||
@@ -16,6 +17,7 @@
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::Network;
|
||||
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
namespace Components
|
||||
@@ -31,8 +33,11 @@ namespace BlackGui
|
||||
this->hide();
|
||||
this->m_hideTimer = new QTimer(this);
|
||||
this->m_hideTimer->setSingleShot(true);
|
||||
this->onStyleSheetsChanged();
|
||||
|
||||
connect(this->m_hideTimer, &QTimer::timeout, this, &CInfoWindowComponent::hide);
|
||||
connect(this->ui->pb_Close, &QPushButton::pressed, this, &CInfoWindowComponent::hide);
|
||||
connect(&CStyleSheetUtility::instance(), &CStyleSheetUtility::styleSheetsChanged, this, &CInfoWindowComponent::onStyleSheetsChanged);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -145,5 +150,14 @@ namespace BlackGui
|
||||
{
|
||||
this->ui->sw_DifferentModes->setCurrentWidget(widget);
|
||||
}
|
||||
|
||||
/*
|
||||
* Style sheet changed
|
||||
*/
|
||||
void CInfoWindowComponent::onStyleSheetsChanged()
|
||||
{
|
||||
QString st = CStyleSheetUtility::instance().style(CStyleSheetUtility::fileNameInfoWindow());
|
||||
this->setStyleSheet(st);
|
||||
}
|
||||
}
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user