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();
|
QDir("temp").removeRecursively();
|
||||||
|
|
||||||
// HiDPI workaround
|
// HiDPI workaround
|
||||||
|
// Mainly for Windows, not required in Qt6
|
||||||
if (ReadFileText("./groups/HiDPI").toInt() == 1) {
|
if (ReadFileText("./groups/HiDPI").toInt() == 1) {
|
||||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||||
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||||
|
|||||||
@@ -142,20 +142,6 @@ DialogBasicSettings::DialogBasicSettings(QWidget *parent)
|
|||||||
mainwindow->repaint();
|
mainwindow->repaint();
|
||||||
NekoRay::dataStore->Save();
|
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
|
// Subscription
|
||||||
|
|
||||||
|
|||||||
@@ -248,54 +248,8 @@
|
|||||||
<string>Style</string>
|
<string>Style</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QGridLayout" name="gridLayout_5">
|
<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">
|
<item row="0" column="0">
|
||||||
<layout class="QHBoxLayout" name="_3">
|
<layout class="QHBoxLayout" name="style_h_1">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox">
|
<widget class="QGroupBox" name="groupBox">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||||
@@ -336,6 +290,19 @@
|
|||||||
</item>
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -384,8 +351,8 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="2" column="0">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_12">
|
<layout class="QHBoxLayout" name="style_h_2">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="traffic_statistics_box">
|
<widget class="QGroupBox" name="traffic_statistics_box">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
@@ -440,8 +407,8 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="0">
|
<item row="3" column="0">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_24">
|
<layout class="QHBoxLayout" name="style_h_3">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="horizontalGroupBox_5">
|
<widget class="QGroupBox" name="horizontalGroupBox_5">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||||
@@ -462,15 +429,22 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox_3">
|
<widget class="QGroupBox" name="groupBox_2">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_25">
|
<layout class="QHBoxLayout" name="horizontalLayout_23">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="AA_EnableHighDpiScaling">
|
<widget class="QLabel" name="label_17">
|
||||||
<property name="toolTip">
|
|
||||||
<string notr="true">Enable Qt::AA_EnableHighDpiScaling, maybe useful for HiDPI screens.</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<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>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -496,13 +470,6 @@
|
|||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="MyLineEdit" name="user_agent"/>
|
<widget class="MyLineEdit" name="user_agent"/>
|
||||||
</item>
|
</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">
|
<item row="1" column="1">
|
||||||
<widget class="QCheckBox" name="sub_use_proxy">
|
<widget class="QCheckBox" name="sub_use_proxy">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -517,6 +484,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="tab_4">
|
<widget class="QWidget" name="tab_4">
|
||||||
@@ -655,8 +629,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>568</width>
|
<width>198</width>
|
||||||
<height>297</height>
|
<height>58</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||||
|
|||||||
Reference in New Issue
Block a user