Skip to content

Commit 9a8eaf6

Browse files
committed
v0.2.70: Fix status bar width/height, fix horizontal split
1 parent 7aad8bd commit 9a8eaf6

4 files changed

Lines changed: 17 additions & 22 deletions

File tree

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.2.68 (a84c392)
1+
0.2.70 (6f291ac)

imgui.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[Window][Editor]
22
Pos=0,0
3-
Size=933,736
3+
Size=1655,830
44
Collapsed=0
55

66
[Window][DockSpace]

pcode-settings.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"window_w": 933,
3-
"window_h": 736,
2+
"window_w": 1655,
3+
"window_h": 830,
44
"dark_theme": true,
55
"show_status_bar": true,
66
"word_wrap": true,
@@ -12,6 +12,6 @@
1212
"tab_size": 4,
1313
"font_size": 17,
1414
"font_name": "CascadiaMono",
15-
"last_open_dir": ".",
16-
"recent_files": [".\\BUILD_SYSTEM.md", "C:\\Users\\casse\\github\\pcode-editor\\src\\editor_app.cpp", "C:\\Users\\casse\\github\\pcode-editor\\src\\editor_app.h", "C:\\Users\\casse\\github\\pcode-editor\\src\\main.cpp"]
15+
"last_open_dir": "C:\\Users\\casse\\github\\pcode-editor\\src",
16+
"recent_files": ["C:\\Users\\casse\\github\\pcode-editor\\src\\editor_app.h", ".\\BUILD_SYSTEM.md", "C:\\Users\\casse\\github\\pcode-editor\\src\\editor_app.cpp", "C:\\Users\\casse\\github\\pcode-editor\\src\\main.cpp"]
1717
}

src/editor_app.cpp

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ std::string EditorApp::get_version() {
175175
} else {
176176
version = "BUG-merang!!!"; // fallback if VERSION file missing
177177
}
178-
return "pCode Editor version " + version;
178+
return "pCode Editor version 0.2.68 (a84c392)" + version;
179179
}
180180

181181
// ============================================================================
@@ -365,15 +365,15 @@ void EditorApp::update_native_status_bar() {
365365
int clientWidth = clientRect.right - clientRect.left;
366366
int clientHeight = clientRect.bottom - clientRect.top;
367367

368-
// Calculate needed size for status bar (standard height ~24 pixels)
369-
int statusHeight = 24;
368+
// Calculate needed size for status bar - taller to not overlap scrollbar
369+
int statusHeight = 30;
370370
int statusY = clientHeight - statusHeight;
371371

372372
// Resize the status bar control to match window width
373373
MoveWindow(status_hwnd, 0, statusY, clientWidth, statusHeight, TRUE);
374374

375375
// Simple 2-part layout (left side + fill right)
376-
int part1 = 150; // Mode + filename area
376+
int part1 = 250; // Mode area - wider for full words
377377
int parts[2] = {part1, -1};
378378
SendMessage(status_hwnd, SB_SETPARTS, 2, (LPARAM)parts);
379379

@@ -3874,18 +3874,18 @@ void EditorApp::render_splits(int tab_idx) {
38743874
else vertical_count++;
38753875
}
38763876

3877-
if (horizontal_count > 0 || (horizontal_count == 0 && vertical_count == 0)) {
3878-
// Horizontal splits - use Columns for proper layout
3877+
if (vertical_count > 0) {
3878+
// Vertical splits - side by side (left to right)
38793879
ImGui::Columns((int)tab.splits.size(), "split_cols", false);
38803880

38813881
for (int i = 0; i < (int)tab.splits.size(); i++) {
38823882
auto* split = tab.splits[i];
38833883
float width = avail.x / tab.splits.size();
38843884

38853885
ImGui::PushStyleVar(ImGuiStyleVar_ChildRounding, 0);
3886-
ImGui::BeginChild(("hsplit_" + std::to_string(i)).c_str(), ImVec2(width, avail.y), true);
3886+
ImGui::BeginChild(("vsplit_" + std::to_string(i)).c_str(), ImVec2(width, avail.y), true);
38873887
if (split->editor) {
3888-
split->editor->Render(("Editor_h" + std::to_string(i)).c_str());
3888+
split->editor->Render(("Editor_v" + std::to_string(i)).c_str());
38893889
}
38903890
ImGui::EndChild();
38913891
ImGui::PopStyleVar();
@@ -3896,24 +3896,19 @@ void EditorApp::render_splits(int tab_idx) {
38963896
}
38973897
ImGui::Columns(1);
38983898
} else {
3899-
// Vertical splits - stack vertically (top to bottom)
3900-
ImGui::Columns(1, "vsplit_cols", false);
3901-
3899+
// Horizontal splits - stack top to bottom
39023900
for (int i = 0; i < (int)tab.splits.size(); i++) {
39033901
auto* split = tab.splits[i];
39043902
float height = avail.y / tab.splits.size();
39053903

39063904
ImGui::PushStyleVar(ImGuiStyleVar_ChildRounding, 0);
3907-
ImGui::BeginChild(("vsplit_" + std::to_string(i)).c_str(), ImVec2(avail.x, height), true);
3905+
ImGui::BeginChild(("hsplit_" + std::to_string(i)).c_str(), ImVec2(avail.x, height), true);
39083906
if (split->editor) {
3909-
split->editor->Render(("Editor_v" + std::to_string(i)).c_str());
3907+
split->editor->Render(("Editor_h" + std::to_string(i)).c_str());
39103908
}
39113909
ImGui::EndChild();
39123910
ImGui::PopStyleVar();
3913-
3914-
ImGui::Spacing();
39153911
}
3916-
ImGui::Columns(1);
39173912
}
39183913
}
39193914

0 commit comments

Comments
 (0)