Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Rodmg committed Oct 27, 2023
1 parent 69d872a commit ed090d2
Show file tree
Hide file tree
Showing 58 changed files with 374 additions and 168 deletions.
Binary file modified assets/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/balanceHandle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/balanceHandle_p.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/eq_off.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/eq_off_p.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/eq_on.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/eq_on_p.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/next.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/next_p.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/open.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/open_p.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/pause.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/pause_p.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/pl_add.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/pl_add_p.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/pl_close.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/pl_close_p.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/pl_off.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/pl_off_p.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/pl_on.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/pl_on_p.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/play.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/play_p.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/posHandle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/posHandle_p.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/prev.png
Binary file modified assets/prev_p.png
Binary file modified assets/repeat_off.png
Binary file modified assets/repeat_off_p.png
Binary file modified assets/repeat_on.png
Binary file modified assets/repeat_on_p.png
Binary file modified assets/scroll_handle.png
Binary file modified assets/scroll_handle_p.png
Binary file modified assets/shuffle_off.png
Binary file modified assets/shuffle_off_p.png
Binary file modified assets/shuffle_on.png
Binary file modified assets/shuffle_on_p.png
Binary file modified assets/status_paused.png
Binary file modified assets/status_playing.png
Binary file modified assets/status_stopped.png
Binary file modified assets/stop.png
Binary file modified assets/stop_p.png
Binary file modified assets/visualizationBackground.png
Binary file modified assets/volumeHandle.png
Binary file modified assets/volumeHandle_p.png
51 changes: 51 additions & 0 deletions controlbuttonswidget.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#include "controlbuttonswidget.h"
#include "ui_controlbuttonswidget.h"
#include "scale.h"

ControlButtonsWidget::ControlButtonsWidget(QWidget *parent) :
QWidget(parent),
ui(new Ui::ControlButtonsWidget)
{
ui->setupUi(this);
scale();

connect(ui->playButton, &QPushButton::clicked, this, &ControlButtonsWidget::playClicked);
connect(ui->pauseButton, &QPushButton::clicked, this, &ControlButtonsWidget::pauseClicked);
Expand All @@ -21,3 +23,52 @@ ControlButtonsWidget::~ControlButtonsWidget()
{
delete ui;
}

void ControlButtonsWidget::scale()
{
ui->backButton->setMaximumWidth(ui->backButton->maximumWidth() * UI_SCALE);
ui->backButton->setMinimumWidth(ui->backButton->minimumWidth() * UI_SCALE);
ui->backButton->setMaximumHeight(ui->backButton->maximumHeight() * UI_SCALE);
ui->backButton->setMinimumHeight(ui->backButton->minimumHeight() * UI_SCALE);

ui->playButton->setMaximumWidth(ui->playButton->maximumWidth() * UI_SCALE);
ui->playButton->setMinimumWidth(ui->playButton->minimumWidth() * UI_SCALE);
ui->playButton->setMaximumHeight(ui->playButton->maximumHeight() * UI_SCALE);
ui->playButton->setMinimumHeight(ui->playButton->minimumHeight() * UI_SCALE);

ui->pauseButton->setMaximumWidth(ui->pauseButton->maximumWidth() * UI_SCALE);
ui->pauseButton->setMinimumWidth(ui->pauseButton->minimumWidth() * UI_SCALE);
ui->pauseButton->setMaximumHeight(ui->pauseButton->maximumHeight() * UI_SCALE);
ui->pauseButton->setMinimumHeight(ui->pauseButton->minimumHeight() * UI_SCALE);

ui->stopButton->setMaximumWidth(ui->stopButton->maximumWidth() * UI_SCALE);
ui->stopButton->setMinimumWidth(ui->stopButton->minimumWidth() * UI_SCALE);
ui->stopButton->setMaximumHeight(ui->stopButton->maximumHeight() * UI_SCALE);
ui->stopButton->setMinimumHeight(ui->stopButton->minimumHeight() * UI_SCALE);

ui->nextButton->setMaximumWidth(ui->nextButton->maximumWidth() * UI_SCALE);
ui->nextButton->setMinimumWidth(ui->nextButton->minimumWidth() * UI_SCALE);
ui->nextButton->setMaximumHeight(ui->nextButton->maximumHeight() * UI_SCALE);
ui->nextButton->setMinimumHeight(ui->nextButton->minimumHeight() * UI_SCALE);

ui->openButton->setMaximumWidth(ui->openButton->maximumWidth() * UI_SCALE);
ui->openButton->setMinimumWidth(ui->openButton->minimumWidth() * UI_SCALE);
ui->openButton->setMaximumHeight(ui->openButton->maximumHeight() * UI_SCALE);
ui->openButton->setMinimumHeight(ui->openButton->minimumHeight() * UI_SCALE);

ui->shuffleButton->setMaximumWidth(ui->shuffleButton->maximumWidth() * UI_SCALE);
ui->shuffleButton->setMinimumWidth(ui->shuffleButton->minimumWidth() * UI_SCALE);
ui->shuffleButton->setMaximumHeight(ui->shuffleButton->maximumHeight() * UI_SCALE);
ui->shuffleButton->setMinimumHeight(ui->shuffleButton->minimumHeight() * UI_SCALE);

ui->repeatButton->setMaximumWidth(ui->repeatButton->maximumWidth() * UI_SCALE);
ui->repeatButton->setMinimumWidth(ui->repeatButton->minimumWidth() * UI_SCALE);
ui->repeatButton->setMaximumHeight(ui->repeatButton->maximumHeight() * UI_SCALE);
ui->repeatButton->setMinimumHeight(ui->repeatButton->minimumHeight() * UI_SCALE);
// TODO Stylesheets

this->setMaximumWidth(this->maximumWidth() * UI_SCALE);
this->setMinimumWidth(this->minimumWidth() * UI_SCALE);
this->setMaximumHeight(this->maximumHeight() * UI_SCALE);
this->setMinimumHeight(this->minimumHeight() * UI_SCALE);
}
1 change: 1 addition & 0 deletions controlbuttonswidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class ControlButtonsWidget : public QWidget

private:
Ui::ControlButtonsWidget *ui;
void scale();

signals:
void playClicked();
Expand Down
92 changes: 46 additions & 46 deletions controlbuttonswidget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@
<rect>
<x>0</x>
<y>0</y>
<width>666</width>
<height>51</height>
<width>222</width>
<height>18</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>666</width>
<height>51</height>
<width>222</width>
<height>17</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>666</width>
<height>51</height>
<width>222</width>
<height>18</height>
</size>
</property>
<property name="palette">
Expand Down Expand Up @@ -91,14 +91,14 @@
<widget class="QPushButton" name="backButton">
<property name="minimumSize">
<size>
<width>66</width>
<height>54</height>
<width>22</width>
<height>18</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>66</width>
<height>54</height>
<width>22</width>
<height>18</height>
</size>
</property>
<property name="styleSheet">
Expand All @@ -122,14 +122,14 @@
<widget class="QPushButton" name="playButton">
<property name="minimumSize">
<size>
<width>66</width>
<height>54</height>
<width>22</width>
<height>18</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>66</width>
<height>54</height>
<width>22</width>
<height>18</height>
</size>
</property>
<property name="styleSheet">
Expand All @@ -153,14 +153,14 @@
<widget class="QPushButton" name="pauseButton">
<property name="minimumSize">
<size>
<width>66</width>
<height>54</height>
<width>22</width>
<height>18</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>66</width>
<height>54</height>
<width>22</width>
<height>18</height>
</size>
</property>
<property name="styleSheet">
Expand All @@ -184,14 +184,14 @@
<widget class="QPushButton" name="stopButton">
<property name="minimumSize">
<size>
<width>66</width>
<height>54</height>
<width>22</width>
<height>18</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>66</width>
<height>54</height>
<width>22</width>
<height>18</height>
</size>
</property>
<property name="styleSheet">
Expand All @@ -215,14 +215,14 @@
<widget class="QPushButton" name="nextButton">
<property name="minimumSize">
<size>
<width>66</width>
<height>54</height>
<width>22</width>
<height>18</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>66</width>
<height>54</height>
<width>22</width>
<height>18</height>
</size>
</property>
<property name="styleSheet">
Expand Down Expand Up @@ -252,8 +252,8 @@
</property>
<property name="sizeHint" stdset="0">
<size>
<width>18</width>
<height>20</height>
<width>6</width>
<height>17</height>
</size>
</property>
</spacer>
Expand All @@ -262,14 +262,14 @@
<widget class="QPushButton" name="openButton">
<property name="minimumSize">
<size>
<width>66</width>
<height>48</height>
<width>22</width>
<height>16</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>66</width>
<height>48</height>
<width>22</width>
<height>16</height>
</size>
</property>
<property name="styleSheet">
Expand Down Expand Up @@ -299,8 +299,8 @@
</property>
<property name="sizeHint" stdset="0">
<size>
<width>21</width>
<height>20</height>
<width>7</width>
<height>17</height>
</size>
</property>
</spacer>
Expand All @@ -309,14 +309,14 @@
<widget class="QCheckBox" name="shuffleButton">
<property name="minimumSize">
<size>
<width>141</width>
<height>45</height>
<width>47</width>
<height>15</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>141</width>
<height>45</height>
<width>47</width>
<height>15</height>
</size>
</property>
<property name="styleSheet">
Expand All @@ -325,8 +325,8 @@
}

QCheckBox::indicator {
width: 141px;
height: 45px;
width: 47px;
height: 15px;
}

QCheckBox::indicator:unchecked {
Expand Down Expand Up @@ -370,14 +370,14 @@ QCheckBox::indicator:indeterminate:pressed {
<widget class="QCheckBox" name="repeatButton">
<property name="minimumSize">
<size>
<width>84</width>
<height>45</height>
<width>28</width>
<height>15</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>64</width>
<height>45</height>
<width>28</width>
<height>15</height>
</size>
</property>
<property name="styleSheet">
Expand All @@ -386,8 +386,8 @@ QCheckBox::indicator:indeterminate:pressed {
}

QCheckBox::indicator {
width: 85px;
height: 45px;
width: 28px;
height: 15px;
}

QCheckBox::indicator:unchecked {
Expand Down
16 changes: 16 additions & 0 deletions desktopbasewindow.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,30 @@
#include "desktopbasewindow.h"
#include "ui_desktopbasewindow.h"
#include "scale.h"

DesktopBaseWindow::DesktopBaseWindow(QWidget *parent) :
QWidget(parent),
ui(new Ui::DesktopBaseWindow)
{
ui->setupUi(this);
scale();
}

DesktopBaseWindow::~DesktopBaseWindow()
{
delete ui;
}

void DesktopBaseWindow::scale()
{
this->setBaseSize(this->baseSize() * UI_SCALE);
this->layout()->setContentsMargins(this->layout()->contentsMargins() * UI_SCALE);

ui->bodyContainer->layout()->setContentsMargins(ui->bodyContainer->layout()->contentsMargins() * UI_SCALE);
ui->bodyOuterFrame->layout()->setContentsMargins(ui->bodyOuterFrame->layout()->contentsMargins() * UI_SCALE);

ui->titlebarContainer->setMaximumHeight(ui->titlebarContainer->maximumHeight() * UI_SCALE);
ui->titlebarContainer->setMinimumHeight(ui->titlebarContainer->minimumHeight() * UI_SCALE);

// TODO Stylesheets
}
3 changes: 3 additions & 0 deletions desktopbasewindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ class DesktopBaseWindow : public QWidget
explicit DesktopBaseWindow(QWidget *parent = nullptr);
~DesktopBaseWindow();
Ui::DesktopBaseWindow *ui;

private:
void scale();
};

#endif // DESKTOPBASEWINDOW_H
Loading

0 comments on commit ed090d2

Please sign in to comment.