mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-04-24 23:47:20 +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);
|
||||
setAspectRatioMode(Plasma::IgnoreAspectRatio);
|
||||
setHasConfigurationInterface(true);
|
||||
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
|
||||
// text format init
|
||||
formatLine.append(QString(""));
|
||||
formatLine.append(QString(""));
|
||||
@ -202,9 +203,9 @@ void AwesomeWidget::init()
|
||||
textLabel = new CustomLabel(this, debug);
|
||||
QGraphicsProxyWidget *pw = new QGraphicsProxyWidget(this);
|
||||
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->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
|
||||
textLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
pw->setWidget(textLabel);
|
||||
mainLayout->addItem(pw, 0, 0);
|
||||
|
||||
|
@ -39,6 +39,7 @@ void AwesomeWidget::reinit()
|
||||
textLabel->setPopupEnabled(true);
|
||||
updateText(true);
|
||||
textLabel->adjustSize();
|
||||
mainLayout->itemAt(0, 0)->setGeometry(textLabel->geometry());
|
||||
|
||||
keys = getKeys();
|
||||
foundKeys = findKeys();
|
||||
|
Loading…
Reference in New Issue
Block a user