Skip to content

Commit

Permalink
DPI scale
Browse files Browse the repository at this point in the history
  • Loading branch information
KinoMyu committed Jul 7, 2019
1 parent 3334151 commit a1f6373
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
6 changes: 2 additions & 4 deletions mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<sizepolicy hsizetype="Fixed" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
Expand All @@ -25,7 +25,7 @@
<property name="maximumSize">
<size>
<width>413</width>
<height>554</height>
<height>16777215</height>
</size>
</property>
<property name="windowTitle">
Expand Down Expand Up @@ -375,7 +375,6 @@
<property name="font">
<font>
<family>Meiryo UI</family>
<pointsize>8</pointsize>
<weight>50</weight>
<bold>false</bold>
<stylestrategy>PreferDefault</stylestrategy>
Expand Down Expand Up @@ -532,7 +531,6 @@
<property name="font">
<font>
<family>Meiryo UI</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="mouseTracking">
Expand Down
5 changes: 5 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
int main(int argc, char *argv[])
{
QApplication a(argc, argv);

QFont font = qApp->font();
font.setPixelSize(11);
qApp->setFont(font);

QTranslator translator;

BASS_Init(-1,44100,BASS_DEVICE_LATENCY,0,NULL);
Expand Down
8 changes: 8 additions & 0 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,17 @@ MainWindow::MainWindow(QWidget *parent) :
idol_image[11] = ui->idolimage11;
idol_image[12] = ui->idolimage12;

QFont font = qApp->font();
font.setFamily("Meiryo UI");
font.setPixelSize(15);
ui->label->setFont(font);

bgm = new HCAStreamChannel(&dec, 0.9f);
for(int i = 0; i < NUM_IDOLS; ++i)
{
auto szpolicy = idol_image[i]->sizePolicy();
szpolicy.setHeightForWidth(true);
idol_image[i]->setSizePolicy(szpolicy);
idols[i] = new HCAStreamChannel(&dec, 0.9f);
idols_oneshot[i] = new HCAStreamChannel(&dec, 0.9f);
connect(idol_selection_box[i], SIGNAL(currentIndexChanged(QString)), this, SLOT(setIdolName(QString)));
Expand Down

0 comments on commit a1f6373

Please sign in to comment.