mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-04-25 16:07:19 +00:00
update install scripts
This commit is contained in:
parent
554354ce36
commit
97fbb4acc1
2
PKGBUILD
2
PKGBUILD
@ -4,7 +4,7 @@ pkgname=kdeplasma-applets-awesome-widgets
|
|||||||
_pkgname=awesome-widgets
|
_pkgname=awesome-widgets
|
||||||
pkgver=1.11.0
|
pkgver=1.11.0
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Collection of minimalistic Plasmoids which look like Awesome WM widgets"
|
pkgdesc="Collection of minimalistic Plasmoids which look like Awesome WM widgets (ex-PyTextMonitor)"
|
||||||
arch=('i686' 'x86_64')
|
arch=('i686' 'x86_64')
|
||||||
url="http://arcanis.name/projects/awesome-widgets"
|
url="http://arcanis.name/projects/awesome-widgets"
|
||||||
license=('GPL3')
|
license=('GPL3')
|
||||||
|
@ -1,18 +1,11 @@
|
|||||||
func_update() {
|
post_install() {
|
||||||
cat << EOF
|
|
||||||
Update plasmoids...
|
|
||||||
EOF
|
|
||||||
kbuildsycoca4 > /dev/null 2>&1
|
kbuildsycoca4 > /dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
post_install() {
|
|
||||||
func_update
|
|
||||||
}
|
|
||||||
|
|
||||||
post_upgrade() {
|
post_upgrade() {
|
||||||
func_update
|
post_install "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
post_remove() {
|
post_remove() {
|
||||||
func_update
|
post_install "$1"
|
||||||
}
|
}
|
||||||
|
@ -94,8 +94,8 @@ private:
|
|||||||
QStringList findKeys();
|
QStringList findKeys();
|
||||||
QStringList getKeys();
|
QStringList getKeys();
|
||||||
// ui
|
// ui
|
||||||
QGraphicsLinearLayout *mainLayout;
|
QGraphicsLinearLayout *mainLayout = nullptr;
|
||||||
CustomLabel *textLabel;
|
CustomLabel *textLabel = nullptr;
|
||||||
QTimer *timer;
|
QTimer *timer;
|
||||||
QList<QAction *> contextMenu;
|
QList<QAction *> contextMenu;
|
||||||
// tooltip
|
// tooltip
|
||||||
|
@ -30,6 +30,7 @@ CustomLabel::CustomLabel(AwesomeWidget *wid, const bool debugCmd)
|
|||||||
widget(wid),
|
widget(wid),
|
||||||
debug(debugCmd)
|
debug(debugCmd)
|
||||||
{
|
{
|
||||||
|
setWordWrap(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[Global]
|
[Global]
|
||||||
IconName=system
|
IconName=system
|
||||||
Name=awesome-widget
|
Name=Awesome Widget
|
||||||
Comment=Awesome widget information
|
Comment=Awesome widget information
|
||||||
|
|
||||||
[Event/system]
|
[Event/system]
|
||||||
|
@ -37,6 +37,10 @@ void AwesomeWidget::reinit()
|
|||||||
{
|
{
|
||||||
if (debug) qDebug() << PDEBUG;
|
if (debug) qDebug() << PDEBUG;
|
||||||
|
|
||||||
|
mainLayout->removeItem(textLabel);
|
||||||
|
if (textLabel != nullptr) delete textLabel;
|
||||||
|
setLayout(0);
|
||||||
|
|
||||||
mainLayout = new QGraphicsLinearLayout();
|
mainLayout = new QGraphicsLinearLayout();
|
||||||
mainLayout->setContentsMargins(1, 1, 1, 1);
|
mainLayout->setContentsMargins(1, 1, 1, 1);
|
||||||
if (configuration[QString("layout")].toInt() == 0)
|
if (configuration[QString("layout")].toInt() == 0)
|
||||||
@ -51,12 +55,13 @@ void AwesomeWidget::reinit()
|
|||||||
setBackgroundHints(DefaultBackground);
|
setBackgroundHints(DefaultBackground);
|
||||||
if (configuration[QString("leftStretch")].toInt() == 2)
|
if (configuration[QString("leftStretch")].toInt() == 2)
|
||||||
mainLayout->addStretch(1);
|
mainLayout->addStretch(1);
|
||||||
|
textLabel = new CustomLabel(this, debug);
|
||||||
if (configuration[QString("popup")].toInt() == 0)
|
if (configuration[QString("popup")].toInt() == 0)
|
||||||
textLabel->setPopupEnabled(false);
|
textLabel->setPopupEnabled(false);
|
||||||
else
|
else
|
||||||
textLabel->setPopupEnabled(true);
|
textLabel->setPopupEnabled(true);
|
||||||
updateText(true);
|
|
||||||
mainLayout->addItem(textLabel);
|
mainLayout->addItem(textLabel);
|
||||||
|
updateText(true);
|
||||||
if (configuration[QString("rightStretch")].toInt() == 2)
|
if (configuration[QString("rightStretch")].toInt() == 2)
|
||||||
mainLayout->addStretch(1);
|
mainLayout->addStretch(1);
|
||||||
resize(10, 10);
|
resize(10, 10);
|
||||||
|
Loading…
Reference in New Issue
Block a user