mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-04-24 23:47:20 +00:00
fix #31, update submodules
This commit is contained in:
parent
952fa97fcc
commit
0ab74b493c
@ -1,6 +1,8 @@
|
|||||||
Ver.2.0.5:
|
Ver.2.0.5:
|
||||||
+ add tooltip bottom (#30)
|
+ add tooltip bottom (#30)
|
||||||
|
* fix network interface update
|
||||||
* fix battery tooltip bug
|
* fix battery tooltip bug
|
||||||
|
* edit DP layout (#31)
|
||||||
|
|
||||||
Ver.2.0.4:
|
Ver.2.0.4:
|
||||||
* more correct work with batteries
|
* more correct work with batteries
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
Вер.2.0.5:
|
Вер.2.0.5:
|
||||||
+ добавлен нижний край к тултипу (#30)
|
+ добавлен нижний край к тултипу (#30)
|
||||||
|
* исправлен баг с обновлением сетевого интерфейса
|
||||||
* исправлен баг с тултипом батареи
|
* исправлен баг с тултипом батареи
|
||||||
|
* отредактирована разметка DP (#31)
|
||||||
|
|
||||||
Вер.2.0.4:
|
Вер.2.0.4:
|
||||||
* более корректная работа с батареями
|
* более корректная работа с батареями
|
||||||
|
2
PKGBUILD
2
PKGBUILD
@ -1,4 +1,4 @@
|
|||||||
# Maintainer: Evgeniy "arcanis" Alexeev <arcanis.arch at gmail dot com>
|
# Maintainer: Evgeniy Alekseev <arcanis at archlinux dot org>
|
||||||
|
|
||||||
pkgname=kdeplasma-applets-awesome-widgets
|
pkgname=kdeplasma-applets-awesome-widgets
|
||||||
_pkgname=awesome-widgets
|
_pkgname=awesome-widgets
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
post_install() {
|
post_install() {
|
||||||
kbuildsycoca4 > /dev/null 2>&1
|
kbuildsycoca4 > /dev/null 2>&1
|
||||||
cat << __EOF
|
|
||||||
To migrate to version 2.* and newer see this article:
|
|
||||||
http://arcanis.name/en/2014/09/04/migration-to-v2/
|
|
||||||
__EOF
|
|
||||||
}
|
}
|
||||||
|
|
||||||
post_upgrade() {
|
post_upgrade() {
|
||||||
|
2
sources/3rdparty/tasks
vendored
2
sources/3rdparty/tasks
vendored
@ -1 +1 @@
|
|||||||
Subproject commit f78c18d38156e8f7dd0d342d9f8779bed8b7f84e
|
Subproject commit d4e154aa948b82cee2d41b145763ffd9d9ec3ca7
|
@ -27,8 +27,9 @@
|
|||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QGraphicsGridLayout>
|
#include <QGraphicsGridLayout>
|
||||||
#include <QGraphicsSceneMouseEvent>
|
#include <QGraphicsProxyWidget>
|
||||||
#include <QGraphicsView>
|
#include <QGraphicsView>
|
||||||
|
#include <QMouseEvent>
|
||||||
#include <QProcessEnvironment>
|
#include <QProcessEnvironment>
|
||||||
#include <QTextCodec>
|
#include <QTextCodec>
|
||||||
|
|
||||||
@ -37,7 +38,7 @@
|
|||||||
|
|
||||||
|
|
||||||
CustomPlasmaLabel::CustomPlasmaLabel(DesktopPanel *wid, const int num, const bool debugCmd)
|
CustomPlasmaLabel::CustomPlasmaLabel(DesktopPanel *wid, const int num, const bool debugCmd)
|
||||||
: Plasma::Label(wid),
|
: QLabel(0),
|
||||||
debug(debugCmd),
|
debug(debugCmd),
|
||||||
number(num),
|
number(num),
|
||||||
widget(wid)
|
widget(wid)
|
||||||
@ -59,7 +60,7 @@ int CustomPlasmaLabel::getNumber()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CustomPlasmaLabel::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
void CustomPlasmaLabel::mousePressEvent(QMouseEvent *event)
|
||||||
{
|
{
|
||||||
if (debug) qDebug() << PDEBUG;
|
if (debug) qDebug() << PDEBUG;
|
||||||
if (debug) qDebug() << PDEBUG << ":" << "Get signal" << event->button();
|
if (debug) qDebug() << PDEBUG << ":" << "Get signal" << event->button();
|
||||||
@ -183,11 +184,13 @@ void DesktopPanel::reinit()
|
|||||||
|
|
||||||
// clear
|
// clear
|
||||||
// labels
|
// labels
|
||||||
for (int i=0; i<labels.count(); i++) {
|
for (int i=0; i<proxyWidgets.count(); i++) {
|
||||||
layout->removeItem(labels[i]);
|
layout->removeItem(proxyWidgets[i]);
|
||||||
|
delete proxyWidgets[i];
|
||||||
delete labels[i];
|
delete labels[i];
|
||||||
}
|
}
|
||||||
labels.clear();
|
labels.clear();
|
||||||
|
proxyWidgets.clear();
|
||||||
// layout
|
// layout
|
||||||
layout = new QGraphicsGridLayout();
|
layout = new QGraphicsGridLayout();
|
||||||
layout->setContentsMargins(1, 1, 1, 1);
|
layout->setContentsMargins(1, 1, 1, 1);
|
||||||
@ -199,13 +202,18 @@ void DesktopPanel::reinit()
|
|||||||
setBackgroundHints(NoBackground);
|
setBackgroundHints(NoBackground);
|
||||||
// labels
|
// labels
|
||||||
for (int i=0; i<desktopNames.count(); i++) {
|
for (int i=0; i<desktopNames.count(); i++) {
|
||||||
labels.append(new CustomPlasmaLabel(this, i));
|
proxyWidgets.append(new QGraphicsProxyWidget(this));
|
||||||
|
proxyWidgets[i]->setAttribute(Qt::WA_TranslucentBackground, true);
|
||||||
|
proxyWidgets[i]->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||||
|
labels.append(new CustomPlasmaLabel(this, i, debug));
|
||||||
labels[i]->setWordWrap(false);
|
labels[i]->setWordWrap(false);
|
||||||
labels[i]->setAttribute(Qt::WA_NoSystemBackground, true);
|
labels[i]->setAttribute(Qt::WA_TranslucentBackground, true);
|
||||||
|
labels[i]->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||||
|
proxyWidgets[i]->setWidget(labels[i]);
|
||||||
if (configuration[QString("layout")].toInt() == 0)
|
if (configuration[QString("layout")].toInt() == 0)
|
||||||
layout->addItem(labels[i], 0, i);
|
layout->addItem(proxyWidgets[i], 0, i);
|
||||||
else
|
else
|
||||||
layout->addItem(labels[i], i, 0);
|
layout->addItem(proxyWidgets[i], i, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
updateText(true);
|
updateText(true);
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
#include <Plasma/Applet>
|
#include <Plasma/Applet>
|
||||||
#include <Plasma/DataEngine>
|
#include <Plasma/DataEngine>
|
||||||
#include <Plasma/Label>
|
#include <QLabel>
|
||||||
|
|
||||||
#include <ui_appearance.h>
|
#include <ui_appearance.h>
|
||||||
#include <ui_toggle.h>
|
#include <ui_toggle.h>
|
||||||
@ -29,21 +29,23 @@
|
|||||||
|
|
||||||
|
|
||||||
class QGraphicsGridLayout;
|
class QGraphicsGridLayout;
|
||||||
|
class QGraphicsProxyWidget;
|
||||||
class DesktopPanel;
|
class DesktopPanel;
|
||||||
|
|
||||||
|
|
||||||
class CustomPlasmaLabel : public Plasma::Label
|
class CustomPlasmaLabel : public QLabel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CustomPlasmaLabel(DesktopPanel *wid, const int num,
|
CustomPlasmaLabel(DesktopPanel *wid,
|
||||||
|
const int num,
|
||||||
const bool debugCmd = false);
|
const bool debugCmd = false);
|
||||||
~CustomPlasmaLabel();
|
~CustomPlasmaLabel();
|
||||||
int getNumber();
|
int getNumber();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
void mousePressEvent(QMouseEvent *event);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// debug
|
// debug
|
||||||
@ -89,6 +91,7 @@ private:
|
|||||||
void updateText(const bool first = false);
|
void updateText(const bool first = false);
|
||||||
// ui
|
// ui
|
||||||
QGraphicsGridLayout *layout;
|
QGraphicsGridLayout *layout;
|
||||||
|
QList<QGraphicsProxyWidget *> proxyWidgets;
|
||||||
QList<CustomPlasmaLabel *> labels;
|
QList<CustomPlasmaLabel *> labels;
|
||||||
// debug
|
// debug
|
||||||
bool debug;
|
bool debug;
|
||||||
|
Loading…
Reference in New Issue
Block a user