aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-desktop/panel-plugins/desktopswitcher
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-11-20 15:24:19 -0500
committerKen Moore <ken@ixsystems.com>2017-11-20 15:24:19 -0500
commit757ff403a95e72b2637eb435f6447c7031c75dc5 (patch)
tree99af3cf3723432b3b918151094735432cb295f4d /src-qt5/core/lumina-desktop/panel-plugins/desktopswitcher
parentAdd in the new manpages from Aaron St.John (lumina-docs repo). (diff)
downloadlumina-757ff403a95e72b2637eb435f6447c7031c75dc5.tar.gz
lumina-757ff403a95e72b2637eb435f6447c7031c75dc5.tar.bz2
lumina-757ff403a95e72b2637eb435f6447c7031c75dc5.zip
Adjust the logout dialog size.
Also add the current workspace to the panel button for the workspace switcher.
Diffstat (limited to 'src-qt5/core/lumina-desktop/panel-plugins/desktopswitcher')
-rw-r--r--src-qt5/core/lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src-qt5/core/lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.cpp b/src-qt5/core/lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.cpp
index e6e89075..294b37be 100644
--- a/src-qt5/core/lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.cpp
+++ b/src-qt5/core/lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.cpp
@@ -14,7 +14,7 @@ LDesktopSwitcher::LDesktopSwitcher(QWidget *parent, QString id, bool horizontal)
label = new QToolButton(this);
label->setPopupMode(QToolButton::DelayedPopup);
label->setAutoRaise(true);
- label->setToolButtonStyle(Qt::ToolButtonIconOnly);
+ label->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
label->setIcon( LXDG::findIcon("format-view-carousel", "preferences-desktop-display") );
label->setToolTip(QString(tr("Workspace 1")));
connect(label, SIGNAL(clicked()), this, SLOT(openMenu()));
@@ -44,7 +44,7 @@ void LDesktopSwitcher::setNumberOfDesktops(int number) {
Atom atom = XInternAtom(display, "_NET_NUMBER_OF_DESKTOPS", False);
XEvent xevent;
xevent.type = ClientMessage;
- xevent.xclient.type = ClientMessage;
+ xevent.xclient.type = ClientMessage;
xevent.xclient.display = display;
xevent.xclient.window = rootWindow;
xevent.xclient.message_type = atom;
@@ -129,7 +129,7 @@ void LDesktopSwitcher::createMenu() {
int cur = LSession::handle()->XCB->CurrentWorkspace(); //current desktop number
int tot = LSession::handle()->XCB->NumberOfWorkspaces(); //total number of desktops
//qDebug() << "-- vor getCurrentDesktop SWITCH";
- qDebug() << "Virtual Desktops:" << tot << cur;
+ //qDebug() << "Virtual Desktops:" << tot << cur;
menu->clear();
for (int i = 0; i < tot; i++) {
QString name = QString(tr("Workspace %1")).arg( QString::number(i+1) );
@@ -137,6 +137,7 @@ void LDesktopSwitcher::createMenu() {
menu->addAction(newAction(i, name));
}
label->setToolTip(QString(tr("Workspace %1")).arg(QString::number(cur + 1)));
+ label->setText( QString::number(cur+1) );
}
void LDesktopSwitcher::menuActionTriggered(QAction* act) {
bgstack15