mirror of
https://github.com/MatsuriDayo/nekoray.git
synced 2025-12-18 04:54:38 +03:00
fix ui
This commit is contained in:
@@ -111,6 +111,7 @@ int main(int argc, char* argv[]) {
|
||||
QDir("temp").removeRecursively();
|
||||
|
||||
// HiDPI workaround
|
||||
// Mainly for Windows, not required in Qt6
|
||||
if (ReadFileText("./groups/HiDPI").toInt() == 1) {
|
||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||
|
||||
@@ -142,20 +142,6 @@ DialogBasicSettings::DialogBasicSettings(QWidget *parent)
|
||||
mainwindow->repaint();
|
||||
NekoRay::dataStore->Save();
|
||||
});
|
||||
//
|
||||
ui->AA_EnableHighDpiScaling->setChecked(ReadFileText("groups/HiDPI").toInt() == 1);
|
||||
connect(ui->AA_EnableHighDpiScaling, &QCheckBox::clicked, this, [=](bool checked) {
|
||||
QFile file;
|
||||
file.setFileName("groups/HiDPI");
|
||||
file.open(QIODevice::ReadWrite | QIODevice::Truncate);
|
||||
if (checked) {
|
||||
file.write("1");
|
||||
} else {
|
||||
file.write("0");
|
||||
}
|
||||
file.close();
|
||||
CACHE.needRestart = true;
|
||||
});
|
||||
|
||||
// Subscription
|
||||
|
||||
|
||||
@@ -248,54 +248,8 @@
|
||||
<string>Style</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_5">
|
||||
<item row="4" column="0">
|
||||
<layout class="QHBoxLayout" name="_4">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_4">
|
||||
<layout class="QHBoxLayout" name="_2">
|
||||
<item>
|
||||
<widget class="QPushButton" name="set_custom_icon">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Set custom icon</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_23">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_17">
|
||||
<property name="text">
|
||||
<string>Max log lines</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="max_log_line">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Ignored" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="_3">
|
||||
<layout class="QHBoxLayout" name="style_h_1">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
@@ -336,6 +290,19 @@
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="set_custom_icon">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Set custom icon</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -384,8 +351,8 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_12">
|
||||
<item row="2" column="0">
|
||||
<layout class="QHBoxLayout" name="style_h_2">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="traffic_statistics_box">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
@@ -440,8 +407,8 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_24">
|
||||
<item row="3" column="0">
|
||||
<layout class="QHBoxLayout" name="style_h_3">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="horizontalGroupBox_5">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
@@ -462,15 +429,22 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_25">
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_23">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="AA_EnableHighDpiScaling">
|
||||
<property name="toolTip">
|
||||
<string notr="true">Enable Qt::AA_EnableHighDpiScaling, maybe useful for HiDPI screens.</string>
|
||||
</property>
|
||||
<widget class="QLabel" name="label_17">
|
||||
<property name="text">
|
||||
<string notr="true">HiDPI Screen workaround</string>
|
||||
<string>Max log lines</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="max_log_line">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Ignored" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -496,13 +470,6 @@
|
||||
<item row="0" column="1">
|
||||
<widget class="MyLineEdit" name="user_agent"/>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QCheckBox" name="sub_clear">
|
||||
<property name="text">
|
||||
<string>Clear servers before updating subscription</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="sub_use_proxy">
|
||||
<property name="text">
|
||||
@@ -517,6 +484,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QCheckBox" name="sub_clear">
|
||||
<property name="text">
|
||||
<string>Clear servers before updating subscription</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_4">
|
||||
@@ -655,8 +629,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>568</width>
|
||||
<height>297</height>
|
||||
<width>198</width>
|
||||
<height>58</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||
|
||||
Reference in New Issue
Block a user