Skip to content

Commit a6a43b0

Browse files
committed
Fix more scaling issues
1 parent 9d68ef4 commit a6a43b0

File tree

14 files changed

+143
-31
lines changed

14 files changed

+143
-31
lines changed

3rdparty/WAF/Animation/SideSlide/SideSlideAnimator.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ bool SideSlideAnimator::eventFilter(QObject* _object, QEvent* _event)
284284
{
285285
if (_object == widgetForSlide()->parentWidget()
286286
&& _event->type() == QEvent::Resize) {
287+
287288
QWidget* widgetForSlideParent = widgetForSlide()->parentWidget();
288289
switch (m_side) {
289290
case WAF::RightSide: {
@@ -309,6 +310,8 @@ bool SideSlideAnimator::eventFilter(QObject* _object, QEvent* _event)
309310
}
310311
}
311312

313+
m_decorator->setSlidePos(widgetForSlide()->geometry().topLeft());
314+
312315
//
313316
// Сохраним картинку изменённого выкатываемого виджета
314317
//

3rdparty/WAF/Animation/SideSlide/SideSlideDecorator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ QPoint SideSlideDecorator::slidePos() const
7474
return m_slidePos;
7575
}
7676

77-
void SideSlideDecorator::setSlidePos(const QPoint& _pos)
77+
void SideSlideDecorator::setSlidePos(const QPoint& _pos, bool noCheck)
7878
{
79-
if (m_slidePos != _pos) {
79+
if (m_slidePos != _pos || noCheck) {
8080
m_slidePos = _pos;
8181
update();
8282
}

3rdparty/WAF/Animation/SideSlide/SideSlideDecorator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ namespace WAF
4545
/**
4646
* @brief Установить позицию выкатываемого виджета
4747
*/
48-
void setSlidePos(const QPoint& _pos);
48+
void setSlidePos(const QPoint& _pos, bool noCheck = false);
4949

5050
signals:
5151
/**

src/MainWindow.cpp

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,18 @@ MainWindow::MainWindow(QString exepath,
360360

361361
// Init 3-dot menu button
362362
{
363+
// Fix tool button height
364+
int tbSize = ui->disableFX->height() - 4;
365+
ui->set->setMinimumSize(tbSize + 3, tbSize);
366+
ui->toolButton->setMinimumSize(tbSize + 3, tbSize);
367+
ui->cpreset->setMinimumSize(tbSize + 3, tbSize);
368+
369+
ui->set->setIconSize(QSize(16,16));
370+
ui->cpreset->setIconSize(QSize(16,16));
371+
ui->toolButton->setIconSize(QSize(16,16));
372+
ui->disableFX->setIconSize(QSize(16,16));
373+
374+
363375
QMenu *menu = new QMenu();
364376
menu->addAction(tr("Apps"), this, [this]()
365377
{
@@ -374,9 +386,12 @@ MainWindow::MainWindow(QString exepath,
374386
hostLayout->addWidget(sd);
375387
host->hide();
376388
host->setAutoFillBackground(true);
377-
connect(sd, &StatusFragment::closePressed, this, [host]() {
389+
connect(sd, &StatusFragment::closePressed, this, [host,sd]() {
378390
WAF::Animation::sideSlideOut(host, WAF::BottomSide);
391+
host->deleteLater();
392+
sd->deleteLater();
379393
});
394+
host->setMaximumHeight(this->height() - 20);
380395
WAF::Animation::sideSlideIn(host, WAF::BottomSide);
381396
});
382397
menu->addAction(tr("Relink audio pipeline"), this, SLOT(restart()));
@@ -589,6 +604,7 @@ void MainWindow::dialogHandler()
589604
{
590605
if (sender() == ui->set)
591606
{
607+
settingsFragmentHost->setMaximumHeight(this->height() - 20);
592608
WAF::Animation::sideSlideIn(settingsFragmentHost, WAF::BottomSide);
593609
}
594610
else if (sender() == ui->cpreset)

src/MainWindow.ui

Lines changed: 77 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
<item>
7575
<widget class="QStackedWidget" name="tabhost">
7676
<property name="currentIndex">
77-
<number>6</number>
77+
<number>2</number>
7878
</property>
7979
<widget class="QWidget" name="tabHostPage1">
8080
<layout class="QVBoxLayout" name="verticalLayout_6">
@@ -1253,7 +1253,7 @@
12531253
<property name="whatsThis">
12541254
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Interpolating FIR Equalizer&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Enables/disables the FIR equalizer. FIR stands for &amp;quot;Finite Impulse Response&amp;quot;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; text-decoration: underline;&quot;&gt;Filter type:&lt;/span&gt; Chooses between Minimum phase and Linear phase filtering. The minimum phase is the recommended filter type, as it minimizes latency (effectively zero for any sensible filter shape). In contrast, the phase changes introduced are not usually noticeable (linear phase is helpful in pre-/post-production of multitrack recordings, where phase relationships between tracks need to be preserved. However, in real-time playback, linear phase EQ introduces latency at least half as long as the filter length.)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
12551255
</property>
1256-
<layout class="QHBoxLayout" name="horizontalLayout_7" stretch="0,0">
1256+
<layout class="QHBoxLayout" name="horizontalLayout_7" stretch="7,2">
12571257
<property name="spacing">
12581258
<number>11</number>
12591259
</property>
@@ -1272,7 +1272,7 @@
12721272
<item>
12731273
<widget class="QStackedWidget" name="eq_holder">
12741274
<property name="currentIndex">
1275-
<number>1</number>
1275+
<number>0</number>
12761276
</property>
12771277
<widget class="QWidget" name="page_fixed_eq">
12781278
<layout class="QHBoxLayout" name="horizontalLayout_11">
@@ -1330,6 +1330,12 @@
13301330
</property>
13311331
<item>
13321332
<widget class="QCheckBox" name="enable_eq">
1333+
<property name="minimumSize">
1334+
<size>
1335+
<width>130</width>
1336+
<height>0</height>
1337+
</size>
1338+
</property>
13331339
<property name="maximumSize">
13341340
<size>
13351341
<width>130</width>
@@ -1343,9 +1349,15 @@
13431349
</item>
13441350
<item>
13451351
<widget class="QComboBox" name="eqpreset">
1346-
<property name="maximumSize">
1352+
<property name="minimumSize">
13471353
<size>
13481354
<width>130</width>
1355+
<height>0</height>
1356+
</size>
1357+
</property>
1358+
<property name="maximumSize">
1359+
<size>
1360+
<width>16777215</width>
13491361
<height>16777215</height>
13501362
</size>
13511363
</property>
@@ -1358,9 +1370,15 @@
13581370
</item>
13591371
<item>
13601372
<widget class="QComboBox" name="eqfiltertype">
1361-
<property name="maximumSize">
1373+
<property name="minimumSize">
13621374
<size>
13631375
<width>130</width>
1376+
<height>0</height>
1377+
</size>
1378+
</property>
1379+
<property name="maximumSize">
1380+
<size>
1381+
<width>16777215</width>
13641382
<height>16777215</height>
13651383
</size>
13661384
</property>
@@ -1381,9 +1399,15 @@
13811399
</item>
13821400
<item>
13831401
<widget class="QComboBox" name="eqinterpolator">
1384-
<property name="maximumSize">
1402+
<property name="minimumSize">
13851403
<size>
13861404
<width>130</width>
1405+
<height>0</height>
1406+
</size>
1407+
</property>
1408+
<property name="maximumSize">
1409+
<size>
1410+
<width>16777215</width>
13871411
<height>16777215</height>
13881412
</size>
13891413
</property>
@@ -1407,9 +1431,15 @@
14071431
</item>
14081432
<item>
14091433
<widget class="QPushButton" name="reseteq">
1410-
<property name="maximumSize">
1434+
<property name="minimumSize">
14111435
<size>
14121436
<width>130</width>
1437+
<height>0</height>
1438+
</size>
1439+
</property>
1440+
<property name="maximumSize">
1441+
<size>
1442+
<width>16777215</width>
14131443
<height>16777215</height>
14141444
</size>
14151445
</property>
@@ -1435,6 +1465,12 @@
14351465
</property>
14361466
<item>
14371467
<widget class="QRadioButton" name="eq_r_fixed">
1468+
<property name="minimumSize">
1469+
<size>
1470+
<width>130</width>
1471+
<height>0</height>
1472+
</size>
1473+
</property>
14381474
<property name="text">
14391475
<string>Fixed bands</string>
14401476
</property>
@@ -1445,6 +1481,12 @@
14451481
</item>
14461482
<item>
14471483
<widget class="QRadioButton" name="eq_r_flex">
1484+
<property name="minimumSize">
1485+
<size>
1486+
<width>130</width>
1487+
<height>0</height>
1488+
</size>
1489+
</property>
14481490
<property name="text">
14491491
<string>Flexible bands</string>
14501492
</property>
@@ -1480,7 +1522,7 @@
14801522
<property name="whatsThis">
14811523
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Convolver&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Partitioned convolver (Auto segmenting convolution). Select your impulse response file to be convolved. It takes the signal characteristics of the impulse response and applies them to the incoming audio in real-time.&lt;/p&gt;&lt;p&gt;Supports mono, stereo, full/true stereo (LL, LR, RL, RR) impulse responses.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; text-decoration: underline;&quot;&gt;Impulse response optimization:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;This parameter attempts to reduce the length of the impulse response as much as possible; the whole point is to reduce latency as much as possible, possibly reducing power consumption.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
14821524
</property>
1483-
<layout class="QHBoxLayout" name="horizontalLayout" stretch="6,1">
1525+
<layout class="QHBoxLayout" name="horizontalLayout" stretch="7,2">
14841526
<property name="leftMargin">
14851527
<number>0</number>
14861528
</property>
@@ -1640,9 +1682,15 @@
16401682
<layout class="QVBoxLayout" name="verticalLayout_17">
16411683
<item>
16421684
<widget class="QCheckBox" name="conv_enable">
1643-
<property name="maximumSize">
1685+
<property name="minimumSize">
16441686
<size>
16451687
<width>130</width>
1688+
<height>0</height>
1689+
</size>
1690+
</property>
1691+
<property name="maximumSize">
1692+
<size>
1693+
<width>16777215</width>
16461694
<height>16777215</height>
16471695
</size>
16481696
</property>
@@ -1660,9 +1708,15 @@
16601708
</item>
16611709
<item>
16621710
<widget class="QComboBox" name="conv_ir_opt">
1663-
<property name="maximumSize">
1711+
<property name="minimumSize">
16641712
<size>
16651713
<width>130</width>
1714+
<height>0</height>
1715+
</size>
1716+
</property>
1717+
<property name="maximumSize">
1718+
<size>
1719+
<width>16777215</width>
16661720
<height>16777215</height>
16671721
</size>
16681722
</property>
@@ -1692,6 +1746,18 @@
16921746
</item>
16931747
<item>
16941748
<widget class="QPushButton" name="conv_adv_wave_edit">
1749+
<property name="minimumSize">
1750+
<size>
1751+
<width>130</width>
1752+
<height>0</height>
1753+
</size>
1754+
</property>
1755+
<property name="maximumSize">
1756+
<size>
1757+
<width>16777215</width>
1758+
<height>16777215</height>
1759+
</size>
1760+
</property>
16951761
<property name="text">
16961762
<string>Edit</string>
16971763
</property>
@@ -1721,7 +1787,7 @@
17211787
<property name="whatsThis">
17221788
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;ViPER-DDC&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Its main job is to perform parametric equalization on audio, however it requires the user to provide a .vdc file that DDCToolbox generates.&lt;/p&gt;&lt;p&gt;ViPER-DDC in jDSP is a generalized implementation of second-order section filters, which is slightly different from the implementation in Viper4Android. V4A supports only Peaking parametric; the reason is that V4A uses a share coefficient property of Peaking filter. In contrast, jDSP does not have such an assumption.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
17231789
</property>
1724-
<layout class="QHBoxLayout" name="horizontalLayout_10" stretch="6,0">
1790+
<layout class="QHBoxLayout" name="horizontalLayout_10" stretch="7,2">
17251791
<property name="leftMargin">
17261792
<number>0</number>
17271793
</property>

src/interface/dialog/AutoEqSelector.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ AutoEQSelector::AutoEQSelector(QWidget *parent) :
1212
QDialog(parent),
1313
ui(new Ui::AutoEQSelector)
1414
{
15-
ui->setupUi(this);
16-
setFixedSize(geometry().width(), geometry().height());
15+
ui->setupUi(this);
1716
ui->listWidget->setItemDelegate(new ItemSizeDelegate);
1817

1918
imgSizeCache = ui->picture->size() * 11.5;

src/interface/fragment/AppManagerFragment.ui

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<property name="maximumSize">
2020
<size>
2121
<width>16777215</width>
22-
<height>310</height>
22+
<height>16777215</height>
2323
</size>
2424
</property>
2525
<property name="windowTitle">
@@ -76,6 +76,9 @@
7676
</item>
7777
<item>
7878
<widget class="CListView" name="apps">
79+
<property name="sizeAdjustPolicy">
80+
<enum>QAbstractScrollArea::AdjustIgnored</enum>
81+
</property>
7982
<property name="editTriggers">
8083
<set>QAbstractItemView::NoEditTriggers</set>
8184
</property>
@@ -106,6 +109,9 @@
106109
<property name="spacing">
107110
<number>1</number>
108111
</property>
112+
<property name="uniformItemSizes">
113+
<bool>false</bool>
114+
</property>
109115
</widget>
110116
</item>
111117
</layout>

src/interface/fragment/SettingsFragment.ui

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
<property name="minimumSize">
1414
<size>
1515
<width>685</width>
16-
<height>0</height>
16+
<height>350</height>
1717
</size>
1818
</property>
1919
<property name="maximumSize">
2020
<size>
21-
<width>685</width>
22-
<height>350</height>
21+
<width>16777215</width>
22+
<height>16777215</height>
2323
</size>
2424
</property>
2525
<property name="windowTitle">
@@ -50,7 +50,7 @@
5050
</widget>
5151
</item>
5252
<item>
53-
<layout class="QHBoxLayout" name="horizontalLayout_7" stretch="4,0">
53+
<layout class="QHBoxLayout" name="horizontalLayout_7" stretch="1,4">
5454
<property name="topMargin">
5555
<number>0</number>
5656
</property>
@@ -125,7 +125,7 @@
125125
</size>
126126
</property>
127127
<property name="currentIndex">
128-
<number>2</number>
128+
<number>3</number>
129129
</property>
130130
<widget class="QWidget" name="interface_2">
131131
<property name="maximumSize">

src/interface/fragment/StatusFragment.ui

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<property name="minimumSize">
1414
<size>
1515
<width>0</width>
16-
<height>0</height>
16+
<height>250</height>
1717
</size>
1818
</property>
1919
<property name="maximumSize">

src/interface/model/AppItem.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,21 @@
55
#include "config/AppConfig.h"
66
#include "utils/Log.h"
77

8-
AppItem::AppItem(AppItemModel* model, uint id, QWidget *parent) :
8+
AppItem::AppItem(AppItemModel* _model, int id, QWidget *parent) :
99
QWidget(parent),
1010
ui(new Ui::AppItem),
11-
model(model),
1211
id(id)
1312
{
1413
ui->setupUi(this);
1514

15+
// Dummy mode
16+
if(id == -1)
17+
{
18+
return;
19+
}
20+
21+
model = _model;
22+
1623
#ifdef USE_PULSEAUDIO
1724
ui->blocklist->hide();
1825
#endif

0 commit comments

Comments
 (0)