Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
d423ea5
Merge pull request #171 from Lazap-Development/main
p0ryae Dec 28, 2025
8630a46
Merge branch 'main' into nightly
p0ryae Dec 28, 2025
c339e92
feat: add shell.nix for dev, bump some versions and fix tomlplusplus …
p0ryae May 28, 2026
4aca9bd
feat(system_tray): Add the minimize to tray feature
data-redacted-314159 Jun 2, 2026
4c190c9
fix: formatting
data-redacted-314159 Jun 2, 2026
0f58771
fix: Add libnotify-dev to CD dependencies
LegItMate Jun 2, 2026
2548c8e
Merge branch 'main' of https://github.com/Lazap-Development/Lazap int…
LegItMate Jun 2, 2026
0ec42db
Merge branch 'main' of https://github.com/Lazap-Development/Lazap int…
LegItMate Jun 2, 2026
bc5fe29
fix: update shell.nix to have proper deps for system tray
p0ryae Jun 2, 2026
30b4823
Merge branch 'nightly' of https://github.com/Lazap-Development/Lazap …
p0ryae Jun 2, 2026
02a49e6
Merge branch 'main' of https://github.com/Lazap-Development/Lazap int…
LegItMate Jun 2, 2026
a1ca0f6
feat(autostart): Add the launch on startup option
LegItMate Jun 3, 2026
45d5903
fix: improve tray code, use .png for linux platform tray icon
p0ryae Jun 4, 2026
6118264
feat(custom_bg): Add custom background and opacity features
LegItMate Jun 4, 2026
22f35e7
Merge branch 'main' of https://github.com/Lazap-Development/Lazap int…
LegItMate Jun 7, 2026
34a5dbe
feat(fonts): Add FreeType font loading
LegItMate Jun 7, 2026
bdf777f
fix(ui): Fix major UI scaling issues
LegItMate Jun 10, 2026
041a212
fix(frame): Add resize cursor when hovering over edges of the frame(w…
LegItMate Jun 10, 2026
e3ef72f
perf(fonts): Optimize fonts by using dynamic font loading
LegItMate Jun 10, 2026
125325b
Merge branch 'main' into nightly
LegItMate Jun 24, 2026
5d60483
fix(scaling): Final fixes for scaling issues
LegItMate Jun 24, 2026
3f718cb
fix(ui): Add more detail to settings and other minor fixes
LegItMate Jun 25, 2026
f5e6c0d
Added the check for update functionality.
SpoiledUnknown Jun 25, 2026
dde4675
fix(misc): Polishing and misc fixes
LegItMate Jun 25, 2026
96ad93d
fix: color picker not showing and improper loadsvg alpha impl
p0ryae Jun 28, 2026
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 .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:
libpsl-dev \
libidn2-dev \
libnghttp2-dev \
libnotify-dev \
libunistring-dev \
libnotify-dev \
libqt5svg5-dev \
Expand Down
25 changes: 18 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

# Static linking to avoid runtime dependencies (vcruntime)
if(WIN32 AND MSVC)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
if(WIN32 AND MSVC)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
endif()

# Strip debug symbols in release
Expand Down Expand Up @@ -38,13 +38,13 @@ include(FetchContent)

FetchContent_Declare(imgui
GIT_REPOSITORY https://github.com/ocornut/imgui
GIT_TAG v1.92.5-docking
GIT_TAG v1.92.8-docking
GIT_SHALLOW TRUE
)

FetchContent_Declare(glaze
GIT_REPOSITORY https://github.com/stephenberry/glaze.git
GIT_TAG v5.5.4
GIT_TAG v7.7.0
GIT_SHALLOW TRUE
)

Expand All @@ -53,15 +53,21 @@ FetchContent_Declare(stb
DOWNLOAD_NO_EXTRACT TRUE
)

FetchContent_Declare(tray
GIT_REPOSITORY https://github.com/LizardByte/tray.git
GIT_TAG df9af119085e2cd3f1a9e88e4cc865963879d468
GIT_SHALLOW TRUE
)

FetchContent_Declare(lunasvg
GIT_REPOSITORY https://github.com/sammycage/lunasvg.git
GIT_TAG v3.5.0
)

FetchContent_Declare(tomlplusplus
GIT_REPOSITORY https://github.com/marzer/tomlplusplus.git
GIT_TAG 7807a314ad1c0c9c227d9dbd68f23f187163372e
GIT_SHALLOW TRUE
GIT_TAG a43ad3787293f4a46b1d70c0924b5a25d10e79fc
GIT_SHALLOW FALSE
)

FetchContent_Declare(cpr
Expand All @@ -76,8 +82,9 @@ FetchContent_Declare(battery-embed
)

FetchContent_MakeAvailable(
imgui glaze stb lunasvg tomlplusplus cpr battery-embed
imgui glaze stb tray lunasvg tomlplusplus cpr battery-embed
)
find_package(Freetype REQUIRED)

#-----------------------------------------------------------------------------------------------------------------------
# Target Definition
Expand All @@ -95,6 +102,7 @@ add_executable(${EXECUTABLE_NAME}
${imgui_SOURCE_DIR}/imgui_draw.cpp
${imgui_SOURCE_DIR}/imgui_tables.cpp
${imgui_SOURCE_DIR}/imgui_widgets.cpp
${imgui_SOURCE_DIR}/misc/freetype/imgui_freetype.cpp
${imgui_SOURCE_DIR}/backends/imgui_impl_glfw.cpp
${imgui_SOURCE_DIR}/backends/imgui_impl_opengl3.cpp
)
Expand Down Expand Up @@ -148,6 +156,7 @@ target_include_directories(${EXECUTABLE_NAME} PRIVATE
${PROJECT_SOURCE_DIR}/include
${imgui_SOURCE_DIR}/
${stb_SOURCE_DIR}/
${tray_SOURCE_DIR}/src
${tomlplusplus_SOURCE_DIR}/include
)

Expand All @@ -157,7 +166,9 @@ target_link_libraries(${EXECUTABLE_NAME} PRIVATE
glaze::glaze
cpr::cpr
lunasvg
tray::tray
tinyfiledialogs
Freetype::Freetype
$<$<PLATFORM_ID:Linux>:X11>
$<$<PLATFORM_ID:Windows>:dwmapi>
$<$<AND:$<CXX_COMPILER_ID:GNU>,$<PLATFORM_ID:Windows>>:opengl32.a>
Expand Down
5 changes: 5 additions & 0 deletions assets/svg/download.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/svg/upload.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions include/application.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,38 @@ struct RunnerState {
struct WindowCallbacks {
static void mouseButtonCB(GLFWwindow* window, int button, int action,
int mods);
#ifdef _WIN32
static GLFWcursor* cursor_nwse;
static GLFWcursor* cursor_nesw;
static GLFWcursor* cursor_h;
static GLFWcursor* cursor_v;
static bool hovered_;

static int GetResizeZone(double xpos, double ypos, int w, int h,
int threshold) {
bool l = xpos <= threshold;
bool r = xpos >= w - threshold;
bool t = ypos <= threshold;
bool b = ypos >= h - threshold;

if (t && l) return 1; // Top-Left
if (t && r) return 2; // Top-Right
if (b && l) return 3; // Bottom-Left
if (b && r) return 4; // Bottom-Right
if (l) return 5; // Left
if (r) return 6; // Right
if (t) return 7; // Top
if (b) return 8; // Bottom
return 0; // None
}
static void cursorPosCB(GLFWwindow* window, double xpos, double ypos);
static void initCursors() {
cursor_nwse = glfwCreateStandardCursor(GLFW_RESIZE_NWSE_CURSOR);
cursor_nesw = glfwCreateStandardCursor(GLFW_RESIZE_NESW_CURSOR);
cursor_h = glfwCreateStandardCursor(GLFW_RESIZE_EW_CURSOR);
cursor_v = glfwCreateStandardCursor(GLFW_RESIZE_NS_CURSOR);
}
#endif
};

void IdleBySleeping(FpsIdling& ioIdling);
Expand Down
9 changes: 6 additions & 3 deletions include/ui/panel.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,21 @@ class Panel {

void setOnRefresh(std::function<void(const bool)> cb) { onRefresh_ = cb; }

static ImVec2 getScale() {
ImVec2 getScale() {
ImGuiIO& io = ImGui::GetIO();
GLFWmonitor* monitor = glfwGetPrimaryMonitor();
glfwGetMonitorContentScale(monitor, &xs_, &ys_);
if (glfwGetPlatform() == GLFW_PLATFORM_WAYLAND) {
return ImVec2(SCALE_FACTOR, SCALE_FACTOR);
}
return ImVec2(io.DisplayFramebufferScale.x * SCALE_FACTOR,
io.DisplayFramebufferScale.y * SCALE_FACTOR);
return ImVec2(io.DisplayFramebufferScale.x * SCALE_FACTOR * xs_,
io.DisplayFramebufferScale.y * SCALE_FACTOR * ys_);
}

protected:
std::string name_;
Storage* storage_;
float xs_, ys_;
bool visible_ = true;
ImVec2 scale_ = ImVec2(0, 0);

Expand Down
10 changes: 10 additions & 0 deletions include/ui/panels/left_panel.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,19 @@ class LeftPanel : public Panel {
void init() override;
void render() override;
void end() override {}
ImVec2 getScale() {
ImGuiIO& io = ImGui::GetIO();
if (glfwGetPlatform() == GLFW_PLATFORM_WAYLAND) {
return ImVec2(SCALE_FACTOR, SCALE_FACTOR);
}
return ImVec2(io.DisplayFramebufferScale.x * SCALE_FACTOR * xs_,
io.DisplayFramebufferScale.y * SCALE_FACTOR * ys_);
}
float getWidth() { return size_.x; }

private:
Views* view_ = nullptr;
ImVec2 size_;
};

} // namespace ui
114 changes: 59 additions & 55 deletions include/ui/panels/settings.h
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,55 +1,59 @@
#pragma once
#include <imgui.h>

#include "ui/panel.h"
#include "ui/panels/titlebar.h"

namespace ui {
enum class SettingsView {
LauncherConfig,
AccountSettings,
};

enum class InputType {
Toggle,
ColorPicker,
ImagePicker,
IntTextbox,
StringTextbox,
};

class SettingsPanel : public Panel {
public:
SettingsPanel(Storage* storage, Titlebar* titlebar)
: Panel("Settings", storage), titlebar_(titlebar) {}

void init() override;
void render() override;
void end() override {};

private:
bool quitTrayMin_ = false;
bool autoStart_ = false;
bool checkUpdates_ = true;
bool launcherIcons_ = true;
bool customTitlebar_ = true;
bool discordRpc_ = false;

Titlebar* titlebar_;

void loadSettings();
void saveSettings();

bool addMenuButton(const std::string& label, ImVec2 size, bool active);
void addIcon(const std::string& icon);
void addSection(const std::string& title, const std::string& icon);
bool addOption(const std::string& label, InputType input, bool* value,
bool disabled = false);
bool ToggleButton(const char* label, bool* v, bool disabled);
bool ColorBox(const char* id, float color[3], ImVec2 size);
bool FilePickerButton(const char* label, const ImVec2& size);
bool NumberBox(const char* id, float* value, float width);
SettingsView view_ = SettingsView::LauncherConfig;
};

} // namespace ui
#pragma once
#include <imgui.h>

#include "ui/panel.h"
#include "ui/panels/titlebar.h"

namespace ui {
enum class SettingsView {
LauncherConfig,
AccountSettings,
};

enum class InputType {
Toggle,
ColorPicker,
ImagePicker,
IntTextbox,
StringTextbox,
};

class SettingsPanel : public Panel {
public:
SettingsPanel(Storage* storage, Titlebar* titlebar, GLFWwindow* win)
: Panel("Settings", storage), titlebar_(titlebar), window_(win) {}

void init() override;
void render() override;
void end() override {};

private:
bool quitTrayMin_ = false;
bool autoStart_ = false;
bool checkUpdates_ = true;
bool launcherIcons_ = true;
bool customTitlebar_ = true;
bool discordRpc_ = false;
bool isEditing_ = false;

Titlebar* titlebar_;
GLFWwindow* window_;

void loadSettings();
void saveSettings();

bool addMenuButton(const std::string& label, ImVec2 size, bool active);
void addIcon(const std::string& icon);
void addSection(const std::string& title, const std::string& icon);
bool addOption(const std::string& label, InputType input, bool* value,
bool disabled = false);
bool ToggleButton(const char* label, bool* v, bool disabled);
bool ColorBox(const char* id, float color[3], ImVec2 size);
bool FilePickerButton(const char* label, const ImVec2& size);
bool NumberBox(const char* id, float* value, float width);
SettingsView view_ = SettingsView::LauncherConfig;
};

} // namespace ui

std::string rgbToHex(int r, int g, int b);
10 changes: 10 additions & 0 deletions include/ui/panels/titlebar.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,22 @@ class Titlebar : public Panel {

void setTitle(const std::string& text) { title_ = text; }
void setCustomTitlebar(bool enabled) { customTitlebar_ = enabled; }
ImVec2 getScale() {
ImGuiIO& io = ImGui::GetIO();
if (glfwGetPlatform() == GLFW_PLATFORM_WAYLAND) {
return ImVec2(SCALE_FACTOR, SCALE_FACTOR);
}
return ImVec2(io.DisplayFramebufferScale.x * SCALE_FACTOR * xs_,
io.DisplayFramebufferScale.y * SCALE_FACTOR * ys_);
}
float getHeight() { return size_.y; }

private:
bool customTitlebar_ = true;

std::string title_ = "Home";
GLFWwindow* window;
ImVec2 size_;
};

} // namespace ui
1 change: 1 addition & 0 deletions include/ui/theme.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ namespace Themes {

inline uint32_t ACCENT_COLOR = 0x7E4CEA;
inline ImU32 ACCENT_COLOR_IMGUI = IM_COL32(0x7E, 0x4C, 0xEA, 255);
inline float BG_OPACITY = 0.8;

void setDefaultDarkColors();

Expand Down
20 changes: 20 additions & 0 deletions include/utils/autostart.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#ifdef _WIN32
#include <shlwapi.h>
#endif

#include <string>

namespace Autostart {
#ifdef _WIN32
std::wstring getExecutablePath();
HRESULT createShortcut();
#endif

#ifdef __linux__
std::string getExecutablePath();
bool createShortcut();
#endif

bool deleteShortcut();
bool shortcutExists();
} // namespace Autostart
3 changes: 2 additions & 1 deletion include/utils/font_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ class FontManager {
static void init();
static void shutdown();
static ImFont* loadFont(const std::string& name,
b::EmbedInternal::EmbeddedFile embed, float size);
b::EmbedInternal::EmbeddedFile embed,
float size = 16.0f);
static ImFont* getFont(const std::string& name);

private:
Expand Down
1 change: 1 addition & 0 deletions include/utils/image_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class ImageManager {
static GLuint loadSVG(b::EmbedInternal::EmbeddedFile embed,
const std::string& id, uint32_t color);
static GLuint get(const std::string& name);
static void remove(const std::string& name);
static void clear();

private:
Expand Down
12 changes: 12 additions & 0 deletions include/utils/tray_manager.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#pragma once

#include "GLFW/glfw3.h"

namespace TrayManager {
void init(GLFWwindow* window);
void update();
void minimize();
bool shouldQuit();
bool isWindowHidden();
void shutdown();
} // namespace TrayManager
Loading
Loading