mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-04-25 07:57:19 +00:00
fix aw geometry
This commit is contained in:
parent
830bab7cb6
commit
17c3383616
@ -49,6 +49,7 @@ AwesomeWidget::AwesomeWidget(QObject *parent, const QVariantList &args)
|
|||||||
setBackgroundHints(DefaultBackground);
|
setBackgroundHints(DefaultBackground);
|
||||||
setAspectRatioMode(Plasma::IgnoreAspectRatio);
|
setAspectRatioMode(Plasma::IgnoreAspectRatio);
|
||||||
setHasConfigurationInterface(true);
|
setHasConfigurationInterface(true);
|
||||||
|
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
|
||||||
// text format init
|
// text format init
|
||||||
formatLine.append(QString(""));
|
formatLine.append(QString(""));
|
||||||
formatLine.append(QString(""));
|
formatLine.append(QString(""));
|
||||||
@ -202,9 +203,9 @@ void AwesomeWidget::init()
|
|||||||
textLabel = new CustomLabel(this, debug);
|
textLabel = new CustomLabel(this, debug);
|
||||||
QGraphicsProxyWidget *pw = new QGraphicsProxyWidget(this);
|
QGraphicsProxyWidget *pw = new QGraphicsProxyWidget(this);
|
||||||
pw->setAttribute(Qt::WA_TranslucentBackground, true);
|
pw->setAttribute(Qt::WA_TranslucentBackground, true);
|
||||||
pw->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
|
pw->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||||
textLabel->setAttribute(Qt::WA_TranslucentBackground, true);
|
textLabel->setAttribute(Qt::WA_TranslucentBackground, true);
|
||||||
textLabel->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
|
textLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||||
pw->setWidget(textLabel);
|
pw->setWidget(textLabel);
|
||||||
mainLayout->addItem(pw, 0, 0);
|
mainLayout->addItem(pw, 0, 0);
|
||||||
|
|
||||||
|
@ -39,6 +39,7 @@ void AwesomeWidget::reinit()
|
|||||||
textLabel->setPopupEnabled(true);
|
textLabel->setPopupEnabled(true);
|
||||||
updateText(true);
|
updateText(true);
|
||||||
textLabel->adjustSize();
|
textLabel->adjustSize();
|
||||||
|
mainLayout->itemAt(0, 0)->setGeometry(textLabel->geometry());
|
||||||
|
|
||||||
keys = getKeys();
|
keys = getKeys();
|
||||||
foundKeys = findKeys();
|
foundKeys = findKeys();
|
||||||
|
Loading…
Reference in New Issue
Block a user