Files
create/src/Gui/StartupProcess.h
forbes cc5ba638d1
Some checks failed
Build and Test / build (pull_request) Failing after 13m13s
fix(gui): UI appearance polish — Wayland scaling, menu icon size pref, dialog cleanup
- Fix hazy text on Wayland by setting QT_SCALE_FACTOR_ROUNDING_POLICY=RoundPreferFloor
  and QT_ENABLE_HIGHDPI_SCALING=1 in deb and AppImage launchers; remove forced
  QT_QPA_PLATFORM=xcb from AppImage to allow native Wayland (fixes #33)

- Add menu icon size preference selector (Small/Medium/Large/Extra large) in
  General preferences, applied via QMenu stylesheet at startup and on save (fixes #46)

- Replace verbose theme customization banner with concise 'Kindred Create Theme'
  label in UI preferences; split Overlay group into 'Panel Visibility' and
  'Overlay Interaction' sections (fixes #35)

- Remove Addon Manager branding label from General preferences, change recent
  file list default from 4 to 10 (fixes #36)
2026-02-08 13:27:22 -06:00

95 lines
3.0 KiB
C++

// SPDX-License-Identifier: LGPL-2.1-or-later
/***************************************************************************
* Copyright (c) 2024 Werner Mayer <wmayer[at]users.sourceforge.net> *
* *
* This file is part of FreeCAD. *
* *
* FreeCAD is free software: you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as *
* published by the Free Software Foundation, either version 2.1 of the *
* License, or (at your option) any later version. *
* *
* FreeCAD 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 *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with FreeCAD. If not, see *
* <https://www.gnu.org/licenses/>. *
* *
**************************************************************************/
#ifndef GUI_STARTUPPROCESS_H
#define GUI_STARTUPPROCESS_H
#include <FCGlobal.h>
#include <QStringList>
class QApplication;
class QMessageBox;
namespace Gui
{
class Application;
class MainWindow;
class GuiExport StartupProcess
{
public:
StartupProcess();
static void setupApplication();
void execute();
private:
void setLibraryPath();
void setStyleSheetPaths();
void setImagePaths();
void registerEventType();
void setThemePaths();
void setupFileDialog();
};
class GuiExport StartupPostProcess
{
public:
StartupPostProcess(MainWindow* mw, Application& guiApp, QApplication* app);
void setLoadFromPythonModule(bool value);
void execute();
private:
void setWindowTitle();
void setProcessMessages();
void setAutoSaving();
void setToolBarIconSize();
void setMenuIconSize();
void setWheelEventFilter();
void setLocale();
void setCursorFlashing();
void setQtStyle();
void migrateOldTheme(const std::string& style);
void checkOpenGL();
void loadOpenInventor();
void setBranding();
void setStyleSheet();
void autoloadModules(const QStringList& wb);
void setImportImageFormats();
void showMainWindow();
void activateWorkbench();
void checkParameters();
void checkVersionMigration() const;
private:
bool loadFromPythonModule = false;
MainWindow* mainWindow;
Application& guiApp;
QApplication* qtApp;
};
} // namespace Gui
#endif // GUI_STARTUPPROCESS_H