Skip to content

Commit cd1aca4

Browse files
committed
[v0.9.540] Made sure the tracker progress window has a minimum width do always show the full controls, but it can still expand for the progress.
1 parent f62a05d commit cd1aca4

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

source/main.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const char* get_notes_manifest_path();
5555
#define TRACKER_TITLE "Advancely"
5656

5757
// This is the version that gets compared with the latest release tag on GitHub
58-
#define ADVANCELY_VERSION "v0.9.538" // vMAJOR.MINOR.PATCH // Update this always, SAME FORMAT ON RELEASE TAG!
58+
#define ADVANCELY_VERSION "v0.9.540" // vMAJOR.MINOR.PATCH // Update this always, SAME FORMAT ON RELEASE TAG!
5959
#define ADVANCELY_ICON_PATH "/gui/Advancely_Logo_NoText.png" // Starting from /gui folder
6060
#define ADVANCELY_LOGO_PATH "/gui/Advancely_Logo.png" // Starting from /gui folder
6161
#define ADVANCELY_LOGO_SIZE 512.0f // Logo size on startup message window or update successful window

source/tracker.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5408,8 +5408,17 @@ void tracker_render_gui(Tracker *t, AppSettings *settings) {
54085408
}
54095409
ImGui::PushStyleColor(ImGuiCol_Text, title_text_color);
54105410

5411+
// Enforce minimum width for the title bar
5412+
const char *info_window_title = "Info | ESC: Settings | Pan: RMB/MMB Drag | Zoom: Wheel | Click: LMB | Move Win: LMB Drag";
5413+
ImVec2 title_size = ImGui::CalcTextSize(info_window_title);
5414+
// Add padding (WindowPadding * 2 + extra for safety/frame borders)
5415+
float min_info_width = title_size.x + (ImGui::GetStyle().WindowPadding.x * 2.0f) + 40.0f;
5416+
5417+
// Constraint: Minimum width = title width, Maximum width = unlimited
5418+
ImGui::SetNextWindowSizeConstraints(ImVec2(min_info_width, 0.0f), ImVec2(FLT_MAX, FLT_MAX));
5419+
54115420
// This Begin() call draws the window frame and title bar using the styles we just pushed.
5412-
ImGui::Begin("Info | ESC: Settings | Pan: RMB/MMB Drag | Zoom: Wheel | Click: LMB | Move Win: LMB Drag", nullptr,
5421+
ImGui::Begin(info_window_title, nullptr,
54135422
ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoFocusOnAppearing);
54145423

54155424
// --- Set Font Scale for Info Bar CONTENT ---

0 commit comments

Comments
 (0)