mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Use setFixedSize instead of set{Minimum,Maximum}Size combo
This commit is contained in:
parent
cfc254bd90
commit
0f9d83f34b
2 changed files with 3 additions and 8 deletions
|
@ -610,14 +610,10 @@ NotificationsCount::SampleWidget::SampleWidget(
|
||||||
const QPixmap &cache)
|
const QPixmap &cache)
|
||||||
: _owner(owner)
|
: _owner(owner)
|
||||||
, _cache(cache) {
|
, _cache(cache) {
|
||||||
const QSize size(
|
setFixedSize(
|
||||||
cache.width() / cache.devicePixelRatio(),
|
cache.width() / cache.devicePixelRatio(),
|
||||||
cache.height() / cache.devicePixelRatio());
|
cache.height() / cache.devicePixelRatio());
|
||||||
|
|
||||||
resize(size);
|
|
||||||
setMinimumSize(size);
|
|
||||||
setMaximumSize(size);
|
|
||||||
|
|
||||||
setWindowFlags(Qt::WindowFlags(Qt::FramelessWindowHint)
|
setWindowFlags(Qt::WindowFlags(Qt::FramelessWindowHint)
|
||||||
| Qt::WindowStaysOnTopHint
|
| Qt::WindowStaysOnTopHint
|
||||||
| Qt::BypassWindowManagerHint
|
| Qt::BypassWindowManagerHint
|
||||||
|
|
|
@ -586,9 +586,8 @@ void Widget::addToHeight(int add) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Widget::updateGeometry(int x, int y, int width, int height) {
|
void Widget::updateGeometry(int x, int y, int width, int height) {
|
||||||
setGeometry(x, y, width, height);
|
move(x, y);
|
||||||
setMinimumSize(QSize(width, height));
|
setFixedSize(width, height);
|
||||||
setMaximumSize(QSize(width, height));
|
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue