From 5a3ce5ac4fbc5f2169ab9eb7330e2096c73dd639 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 29 Jun 2017 13:16:53 -0400 Subject: Get the RootSubWindow loading/using icons for the various buttons now. --- src-qt5/core/libLumina/RootSubWindow.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src-qt5/core/libLumina/RootSubWindow.cpp') diff --git a/src-qt5/core/libLumina/RootSubWindow.cpp b/src-qt5/core/libLumina/RootSubWindow.cpp index abaceca2..d2ec7503 100644 --- a/src-qt5/core/libLumina/RootSubWindow.cpp +++ b/src-qt5/core/libLumina/RootSubWindow.cpp @@ -13,6 +13,8 @@ #define WIN_BORDER 5 +#include + // === PUBLIC === RootSubWindow::RootSubWindow(QWidget *root, NativeWindow *win) : QFrame(root){ this->setAttribute(Qt::WA_DeleteOnClose); @@ -166,8 +168,11 @@ void RootSubWindow::initWindowFrame(){ mainLayout->setSpacing(0); titleBar->setSpacing(1); titleBar->setContentsMargins(0,0,0,0); - //this->setLayout(mainLayout); - //qDebug() << " - Done"; + //Now load the icons for the button + LIconCache::instance()->loadIcon(closeB, "window-close"); + LIconCache::instance()->loadIcon(maxB, "window-maximize"); + LIconCache::instance()->loadIcon(minB, "window-minimize"); + LIconCache::instance()->loadIcon(otherB, "list"); } void RootSubWindow::LoadProperties( QList< NativeWindow::Property> list){ @@ -262,7 +267,8 @@ void RootSubWindow::propertiesChanged(QList props, QList break; case NativeWindow::Icon: //qDebug() << "Got Icon Change:" << vals[i]; - otherB->setIcon(vals[i].value()); + if(vals[i].value().isNull() ){ LIconCache::instance()->loadIcon(otherB, "window-close"); } + else{ otherB->setIcon(vals[i].value()); } break; case NativeWindow::GlobalPos: qDebug() << "Got Global Pos:" << this->pos() << WinWidget->mapToGlobal(QPoint(0,0)) << WIN->geometry().topLeft() << vals[i].toPoint(); -- cgit