mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-15 14:55:48 +00:00
update install scripts
This commit is contained in:
@ -94,8 +94,8 @@ private:
|
||||
QStringList findKeys();
|
||||
QStringList getKeys();
|
||||
// ui
|
||||
QGraphicsLinearLayout *mainLayout;
|
||||
CustomLabel *textLabel;
|
||||
QGraphicsLinearLayout *mainLayout = nullptr;
|
||||
CustomLabel *textLabel = nullptr;
|
||||
QTimer *timer;
|
||||
QList<QAction *> contextMenu;
|
||||
// tooltip
|
||||
|
@ -30,6 +30,7 @@ CustomLabel::CustomLabel(AwesomeWidget *wid, const bool debugCmd)
|
||||
widget(wid),
|
||||
debug(debugCmd)
|
||||
{
|
||||
setWordWrap(false);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
[Global]
|
||||
IconName=system
|
||||
Name=awesome-widget
|
||||
Name=Awesome Widget
|
||||
Comment=Awesome widget information
|
||||
|
||||
[Event/system]
|
||||
|
@ -37,6 +37,10 @@ void AwesomeWidget::reinit()
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
||||
mainLayout->removeItem(textLabel);
|
||||
if (textLabel != nullptr) delete textLabel;
|
||||
setLayout(0);
|
||||
|
||||
mainLayout = new QGraphicsLinearLayout();
|
||||
mainLayout->setContentsMargins(1, 1, 1, 1);
|
||||
if (configuration[QString("layout")].toInt() == 0)
|
||||
@ -51,12 +55,13 @@ void AwesomeWidget::reinit()
|
||||
setBackgroundHints(DefaultBackground);
|
||||
if (configuration[QString("leftStretch")].toInt() == 2)
|
||||
mainLayout->addStretch(1);
|
||||
textLabel = new CustomLabel(this, debug);
|
||||
if (configuration[QString("popup")].toInt() == 0)
|
||||
textLabel->setPopupEnabled(false);
|
||||
else
|
||||
textLabel->setPopupEnabled(true);
|
||||
updateText(true);
|
||||
mainLayout->addItem(textLabel);
|
||||
updateText(true);
|
||||
if (configuration[QString("rightStretch")].toInt() == 2)
|
||||
mainLayout->addStretch(1);
|
||||
resize(10, 10);
|
||||
|
Reference in New Issue
Block a user