aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-06-29 13:16:53 -0400
committerKen Moore <ken@ixsystems.com>2017-06-29 13:16:53 -0400
commit5a3ce5ac4fbc5f2169ab9eb7330e2096c73dd639 (patch)
treeaddc444d9ed7a0592f95ab55c12f78834ba16ca1 /src-qt5/core
parentde-activate the global position change notifications within the event filter ... (diff)
downloadlumina-5a3ce5ac4fbc5f2169ab9eb7330e2096c73dd639.tar.gz
lumina-5a3ce5ac4fbc5f2169ab9eb7330e2096c73dd639.tar.bz2
lumina-5a3ce5ac4fbc5f2169ab9eb7330e2096c73dd639.zip
Get the RootSubWindow loading/using icons for the various buttons now.
Diffstat (limited to 'src-qt5/core')
-rw-r--r--src-qt5/core/libLumina/LIconCache.h2
-rw-r--r--src-qt5/core/libLumina/RootSubWindow.cpp12
-rw-r--r--src-qt5/core/libLumina/RootWindow.pri3
3 files changed, 12 insertions, 5 deletions
diff --git a/src-qt5/core/libLumina/LIconCache.h b/src-qt5/core/libLumina/LIconCache.h
index 0344e0f3..f58a5510 100644
--- a/src-qt5/core/libLumina/LIconCache.h
+++ b/src-qt5/core/libLumina/LIconCache.h
@@ -69,7 +69,7 @@ private:
private slots:
void IconLoaded(QString id, QDateTime sync, QByteArray *data);
-
+
signals:
void InternalIconLoaded(QString, QDateTime, QByteArray*); //INTERNAL SIGNAL - DO NOT USE in other classes/objects
void IconAvailable(QString); //way for classes to listen/reload icons as they change
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 <LIconCache.h>
+
// === 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<NativeWindow::Property> props, QList
break;
case NativeWindow::Icon:
//qDebug() << "Got Icon Change:" << vals[i];
- otherB->setIcon(vals[i].value<QIcon>());
+ if(vals[i].value<QIcon>().isNull() ){ LIconCache::instance()->loadIcon(otherB, "window-close"); }
+ else{ otherB->setIcon(vals[i].value<QIcon>()); }
break;
case NativeWindow::GlobalPos:
qDebug() << "Got Global Pos:" << this->pos() << WinWidget->mapToGlobal(QPoint(0,0)) << WIN->geometry().topLeft() << vals[i].toPoint();
diff --git a/src-qt5/core/libLumina/RootWindow.pri b/src-qt5/core/libLumina/RootWindow.pri
index 35e0e770..e4d5f00b 100644
--- a/src-qt5/core/libLumina/RootWindow.pri
+++ b/src-qt5/core/libLumina/RootWindow.pri
@@ -10,4 +10,5 @@ INCLUDEPATH *= ${PWD}
# include other library dependencies
include(LUtils.pri)
-include(NativeWindow.pri);
+include(NativeWindow.pri)
+include(LIconCache.pri)
bgstack15