Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions launcher/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1022,6 +1022,7 @@ SET(LAUNCHER_SOURCES
ui/pages/global/MinecraftPage.h
ui/pages/global/LauncherPage.cpp
ui/pages/global/LauncherPage.h
ui/pages/global/AppearancePage.cpp
ui/pages/global/AppearancePage.h
ui/pages/global/ProxyPage.cpp
ui/pages/global/ProxyPage.h
Expand Down
48 changes: 48 additions & 0 deletions launcher/ui/pages/global/AppearancePage.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// SPDX-License-Identifier: GPL-3.0-only
/*
* Freesm Launcher - Minecraft Launcher
* Copyright (C) 2026 so5iso4ka <so5iso4ka@icloud.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

#include "AppearancePage.h"

#include <QScrollArea>

AppearancePage::AppearancePage(QWidget* parent) : QWidget(parent), m_widget(new AppearanceWidget(false, this))
{
auto layout = new QVBoxLayout(this);
layout->setContentsMargins(0, 0, 0, 0);

auto scrollArea = new QScrollArea(this);
scrollArea->setWidgetResizable(true);
scrollArea->setWidget(m_widget);

layout->addWidget(scrollArea);

if (const auto widgetLayout = qobject_cast<QVBoxLayout*>(m_widget->layout())) {
widgetLayout->addStretch();
}
}

bool AppearancePage::apply()
{
m_widget->applySettings();
return true;
}

void AppearancePage::retranslate()
{
m_widget->retranslateUi();
}
15 changes: 7 additions & 8 deletions launcher/ui/pages/global/AppearancePage.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,21 @@
class QTextCharFormat;
class SettingsObject;

class AppearancePage : public AppearanceWidget, public BasePage {
class AppearancePage : public QWidget, public BasePage {
Q_OBJECT

public:
explicit AppearancePage(QWidget* parent = nullptr) : AppearanceWidget(false, parent) { layout()->setContentsMargins(0, 0, 6, 0); }
explicit AppearancePage(QWidget* parent = nullptr);

QString displayName() const override { return tr("Appearance"); }
QIcon icon() const override { return QIcon::fromTheme("appearance"); }
QString id() const override { return "appearance-settings"; }
QString helpPage() const override { return "Launcher-settings"; }

bool apply() override
{
applySettings();
return true;
}
bool apply() override;

void retranslate() override { retranslateUi(); }
void retranslate() override;

private:
AppearanceWidget* m_widget;
};
3 changes: 1 addition & 2 deletions launcher/ui/pages/global/LauncherPage.ui
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,7 @@
</string>
</property>
<property name="text">
<string>Suggest to update an existing instance during modpack installation
</string>
<string>Suggest to update an existing instance during modpack installation</string>
</property>
</widget>
</item>
Expand Down
3 changes: 2 additions & 1 deletion launcher/ui/themes/FreesmTheme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ QString FreesmTheme::appStyleSheet()
"rgba(150, 150, 150);}QScrollBar:vertical, QScrollBar:horizontal {background: none;border: none;}QScrollBar::add-line, "
"QScrollBar::sub-line {background: none;border: none;width: 0px;height: 0px;}QScrollBar::add-page, QScrollBar::sub-page "
"{background: none;}QScrollBar::up-arrow, QScrollBar::down-arrow,QScrollBar::left-arrow, QScrollBar::right-arrow {image: "
"none;width: 0px;height: 0px;}QAbstractScrollArea {background-color: transparent;}QProgressBar {text-align: "
"none;width: 0px;height: 0px;}QScrollBar::handle {min-height: 8px;min-width: 8px;}QAbstractScrollArea {background-color: "
"transparent;}QProgressBar {text-align: "
"right;background-color: "
"qlineargradient(spread:reflect, x1:0.5, y1:0.5, x2:0.5, y2:1, stop:0.119403 rgba(255, 255, 255, 20), stop:0.273632 rgba(0, 0, "
"0, 0));border-radius: 1px;margin-top: 14px;margin-bottom: 14px;margin-right: 30px;}QProgressBar::chunk {background-color: "
Expand Down
2 changes: 1 addition & 1 deletion launcher/ui/widgets/AppearanceWidget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@
<item>
<widget class="QTextEdit" name="consolePreview">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
<sizepolicy hsizetype="Expanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
Expand Down
Loading