mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-09-13 06:53:22 -06:00
ROMInfoDialog: make DS banner more accurate
Change some styling to make the DS banner box in the ROM Info dialog look more like the real banner box in the BIOS by: - Adding the stripes inside the text box - Adding the banded background in the box as a whole - Adding the inner white border - Disabling anti-aliasing on the title font - Reducing letter spacing and line height
This commit is contained in:
@ -82,7 +82,13 @@ ROMInfoDialog::ROMInfoDialog(QWidget* parent) : QDialog(parent), ui(new Ui::ROMI
|
||||
ui->dsiIconImage->setPixmap(QPixmap::fromImage(iconImage));
|
||||
}
|
||||
|
||||
ui->iconTitle->setText(QString::fromUtf16(banner->EnglishTitle));
|
||||
// It seems that setting line-height is not supported in QSS, but is supported in the subset of
|
||||
// CSS implemented in rich text areas. So this will have to be here instead of in the .ui file.
|
||||
ui->iconTitle->setText(
|
||||
"<div style='line-height: 85%;'>" +
|
||||
QString::fromUtf16(banner->EnglishTitle).replace('\n', "<br>") +
|
||||
"</div>"
|
||||
);
|
||||
|
||||
ui->japaneseTitle->setText(QString::fromUtf16(banner->JapaneseTitle));
|
||||
ui->englishTitle->setText(QString::fromUtf16(banner->EnglishTitle));
|
||||
|
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>557</width>
|
||||
<height>547</height>
|
||||
<width>482</width>
|
||||
<height>516</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@ -525,108 +525,193 @@
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<layout class="QGridLayout" name="gridLayout_9">
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="saveIconButton">
|
||||
<property name="text">
|
||||
<string>Save icon</string>
|
||||
<item row="0" column="2">
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Box</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QGroupBox" name="iconBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#iconBox {
|
||||
border: 1px solid black;
|
||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
|
||||
stop: 0 white,
|
||||
stop: 1 lightgrey);
|
||||
}
|
||||
|
||||
#titleBox {
|
||||
border: 0.5px solid grey;
|
||||
background-color: #fbfbfb;
|
||||
}
|
||||
|
||||
#iconTitle {
|
||||
color: black;
|
||||
}
|
||||
</string>
|
||||
<property name="lineWidth">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="iconImage">
|
||||
<item row="0" column="0">
|
||||
<widget class="QGroupBox" name="iconBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
<width>187</width>
|
||||
<height>43</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
<width>187</width>
|
||||
<height>45</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>[icon]</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QGroupBox" name="titleBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#iconBox {
|
||||
border: 1px solid white;
|
||||
background-color: qlineargradient(
|
||||
x1: 0, y1: 1,
|
||||
x2: 0, y2: 0,
|
||||
stop: 0 #c3c3c3,
|
||||
stop: 0.199 #c3c3c3,
|
||||
stop: 0.2 #d3d3d3,
|
||||
stop: 0.399 #d3d3d3,
|
||||
stop: 0.4 #e3e3e3,
|
||||
stop: 0.599 #e3e3e3,
|
||||
stop: 0.6 #f3f3f3,
|
||||
stop: 0.799 #f3f3f3,
|
||||
stop: 0.8 #fbfbfb,
|
||||
stop: 1 #fbfbfb
|
||||
);
|
||||
}
|
||||
|
||||
#iconTitle {
|
||||
border: 1px solid #a2a2a2;
|
||||
border-left-color: #797979;
|
||||
letter-spacing: -0.5px;
|
||||
background-color: qlineargradient(
|
||||
x1: 0, y1: 0,
|
||||
x2: 0, y2: 1,
|
||||
stop: 0.000000 #fbfbfb,
|
||||
stop: 0.024380 #fbfbfb,
|
||||
stop: 0.024390 #e3e3e3,
|
||||
stop: 0.048770 #e3e3e3,
|
||||
stop: 0.048780 #fbfbfb,
|
||||
stop: 0.073161 #fbfbfb,
|
||||
stop: 0.073171 #e3e3e3,
|
||||
stop: 0.097551 #e3e3e3,
|
||||
stop: 0.097561 #fbfbfb,
|
||||
stop: 0.121941 #fbfbfb,
|
||||
stop: 0.121951 #e3e3e3,
|
||||
stop: 0.146331 #e3e3e3,
|
||||
stop: 0.146341 #fbfbfb,
|
||||
stop: 0.170722 #fbfbfb,
|
||||
stop: 0.170732 #e3e3e3,
|
||||
stop: 0.195112 #e3e3e3,
|
||||
stop: 0.195122 #fbfbfb,
|
||||
stop: 0.219502 #fbfbfb,
|
||||
stop: 0.219512 #e3e3e3,
|
||||
stop: 0.243892 #e3e3e3,
|
||||
stop: 0.243902 #fbfbfb,
|
||||
stop: 0.268283 #fbfbfb,
|
||||
stop: 0.268293 #e3e3e3,
|
||||
stop: 0.292673 #e3e3e3,
|
||||
stop: 0.292683 #fbfbfb,
|
||||
stop: 0.317063 #fbfbfb,
|
||||
stop: 0.317073 #e3e3e3,
|
||||
stop: 0.341453 #e3e3e3,
|
||||
stop: 0.341463 #fbfbfb,
|
||||
stop: 0.365844 #fbfbfb,
|
||||
stop: 0.365854 #e3e3e3,
|
||||
stop: 0.390234 #e3e3e3,
|
||||
stop: 0.390244 #fbfbfb,
|
||||
stop: 0.414624 #fbfbfb,
|
||||
stop: 0.414634 #e3e3e3,
|
||||
stop: 0.439014 #e3e3e3,
|
||||
stop: 0.439024 #fbfbfb,
|
||||
stop: 0.463405 #fbfbfb,
|
||||
stop: 0.463415 #e3e3e3,
|
||||
stop: 0.487795 #e3e3e3,
|
||||
stop: 0.487805 #fbfbfb,
|
||||
stop: 0.512185 #fbfbfb,
|
||||
stop: 0.512195 #e3e3e3,
|
||||
stop: 0.536575 #e3e3e3,
|
||||
stop: 0.536585 #fbfbfb,
|
||||
stop: 0.560966 #fbfbfb,
|
||||
stop: 0.560976 #e3e3e3,
|
||||
stop: 0.585356 #e3e3e3,
|
||||
stop: 0.585366 #fbfbfb,
|
||||
stop: 0.609746 #fbfbfb,
|
||||
stop: 0.609756 #e3e3e3,
|
||||
stop: 0.634136 #e3e3e3,
|
||||
stop: 0.634146 #fbfbfb,
|
||||
stop: 0.658527 #fbfbfb,
|
||||
stop: 0.658537 #e3e3e3,
|
||||
stop: 0.682917 #e3e3e3,
|
||||
stop: 0.682927 #fbfbfb,
|
||||
stop: 0.707307 #fbfbfb,
|
||||
stop: 0.707317 #e3e3e3,
|
||||
stop: 0.731697 #e3e3e3,
|
||||
stop: 0.731707 #fbfbfb,
|
||||
stop: 0.756088 #fbfbfb,
|
||||
stop: 0.756098 #e3e3e3,
|
||||
stop: 0.780478 #e3e3e3,
|
||||
stop: 0.780488 #fbfbfb,
|
||||
stop: 0.804868 #fbfbfb,
|
||||
stop: 0.804878 #e3e3e3,
|
||||
stop: 0.829258 #e3e3e3,
|
||||
stop: 0.829268 #fbfbfb,
|
||||
stop: 0.853649 #fbfbfb,
|
||||
stop: 0.853659 #e3e3e3,
|
||||
stop: 0.878039 #e3e3e3,
|
||||
stop: 0.878049 #fbfbfb,
|
||||
stop: 0.902429 #fbfbfb,
|
||||
stop: 0.902439 #e3e3e3,
|
||||
stop: 0.926819 #e3e3e3,
|
||||
stop: 0.926829 #fbfbfb,
|
||||
stop: 0.951210 #fbfbfb,
|
||||
stop: 0.951220 #e3e3e3,
|
||||
stop: 0.975600 #e3e3e3,
|
||||
stop: 0.975610 #fbfbfb
|
||||
);
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<property name="leftMargin">
|
||||
<number>1</number>
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="1">
|
||||
<property name="horizontalSpacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="iconTitle">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
|
||||
@ -636,11 +721,8 @@
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Courier New</family>
|
||||
<pointsize>8</pointsize>
|
||||
<weight>50</weight>
|
||||
<italic>false</italic>
|
||||
<bold>false</bold>
|
||||
<stylestrategy>NoAntialias</stylestrategy>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -651,31 +733,30 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="iconImage">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
<property name="text">
|
||||
<string>[icon]</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@ -683,7 +764,33 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2" alignment="Qt::AlignHCenter">
|
||||
<item row="0" column="0" rowspan="2">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="4" rowspan="2">
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="3" alignment="Qt::AlignHCenter">
|
||||
<widget class="QGroupBox" name="dsiIconBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
@ -758,6 +865,13 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="saveIconButton">
|
||||
<property name="text">
|
||||
<string>Save icon</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QPushButton" name="saveAnimatedIconButton">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
@ -767,32 +881,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3" rowspan="2">
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="0" rowspan="2">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
Reference in New Issue
Block a user