Skip to content
Browse files

Tray rows

Signed-off-by: Maciej Płaza <plaza.maciej@gmail.com>
  • Loading branch information...
1 parent 6625048 commit 8459c40456f368292df3c74faf8d7c39b561c0cc Maciej Płaza committed
Showing with 11 additions and 2 deletions.
  1. +9 −2 razorqt-panel/plugin-tray/razortray.cpp
  2. +2 −0 razorqt-panel/plugin-tray/razortray.h
View
11 razorqt-panel/plugin-tray/razortray.cpp
@@ -41,7 +41,7 @@
#include <X11/extensions/Xrender.h>
#include <X11/extensions/Xdamage.h>
#include "razorqt/xfitman.h"
-
+#include "razorqt/razorgridlayout.h"
#define _NET_SYSTEM_TRAY_ORIENTATION_HORZ 0
#define _NET_SYSTEM_TRAY_ORIENTATION_VERT 1
@@ -70,6 +70,11 @@ RazorTray::RazorTray(const RazorPanelPluginStartInfo* startInfo, QWidget* parent
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding);
mValid = startTray();
+ delete layout();
+
+ mLay = new RazorGridLayout(this);
+ mLay->setRowsCount(2);
+ setLayout(mLay);
}
@@ -108,6 +113,7 @@ void RazorTray::x11EventFilter(XEvent* event)
mIcons.removeAll(icon);
delete icon;
}
+ mLay->reDo();
break;
default:
@@ -358,5 +364,6 @@ void RazorTray::addIcon(Window winId)
icon->setIconSize(mIconSize);
mIcons.append(icon);
- addWidget(icon);
+ //addWidget(icon);
+ mLay->addObject(icon);
}
View
2 razorqt-panel/plugin-tray/razortray.h
@@ -34,6 +34,7 @@
class TrayIcon;
class QSize;
+class RazorGridLayout;
/**
* @brief This makes our trayplugin
@@ -76,6 +77,7 @@ class RazorTray: public RazorPanelPlugin
int mDamageEvent;
int mDamageError;
QSize mIconSize;
+ RazorGridLayout *mLay;
};
EXPORT_RAZOR_PANEL_PLUGIN_H

0 comments on commit 8459c40

Please sign in to comment.
Something went wrong with that request. Please try again.