GUI: use ImGuiChildFlags_Border

This commit is contained in:
tildearrow 2025-08-10 04:53:08 -05:00
parent d701596972
commit 2fc050c6b4
8 changed files with 10 additions and 10 deletions

View file

@ -249,7 +249,7 @@ void FurnaceGUI::drawPalette() {
ImVec2 avail=ImGui::GetContentRegionAvail();
avail.y-=ImGui::GetFrameHeightWithSpacing();
if (ImGui::BeginChild("CommandPaletteList",avail,false,0)) {
if (ImGui::BeginChild("CommandPaletteList",avail,0,0)) {
bool navigated=false;
if (ImGui::IsKeyPressed(ImGuiKey_UpArrow) && curPaletteChoice>0) {
curPaletteChoice-=1;

View file

@ -761,7 +761,7 @@ void FurnaceGUI::drawDebug() {
auto DrawSpot=[&](const CursorJumpPoint& spot) {
ImGui::Text("[%d:%d] <%d:%d, %d>", spot.subSong, spot.order, spot.point.xCoarse, spot.point.xFine, spot.point.y);
};
if (ImGui::BeginChild("##CursorUndoDebugChild", ImVec2(0, 300), true)) {
if (ImGui::BeginChild("##CursorUndoDebugChild", ImVec2(0, 300), ImGuiChildFlags_Border)) {
if (ImGui::BeginTable("##CursorUndoDebug", 2, ImGuiTableFlags_Borders|ImGuiTableFlags_SizingStretchSame)) {
for (size_t row=0; row<MAX(cursorUndoHist.size(),cursorRedoHist.size()); ++row) {
ImGui::TableNextRow();

View file

@ -6002,7 +6002,7 @@ bool FurnaceGUI::loop() {
ImVec2 romLogSize=ImGui::GetContentRegionAvail();
romLogSize.y-=ImGui::GetFrameHeightWithSpacing();
if (romLogSize.y<60.0f*dpiScale) romLogSize.y=60.0f*dpiScale;
if (ImGui::BeginChild("Export Log",romLogSize,true)) {
if (ImGui::BeginChild("Export Log",romLogSize,ImGuiChildFlags_Border)) {
pendingExport->logLock.lock();
ImGui::PushFont(patFont);
for (String& i: pendingExport->exportLog) {

View file

@ -7002,7 +7002,7 @@ void FurnaceGUI::drawInsEdit() {
ImGui::EndTable();
}
if (ImGui::BeginChild("HWSeq",ImGui::GetContentRegionAvail(),true,ImGuiWindowFlags_MenuBar)) {
if (ImGui::BeginChild("HWSeq",ImGui::GetContentRegionAvail(),ImGuiChildFlags_Border,ImGuiWindowFlags_MenuBar)) {
ImGui::BeginMenuBar();
ImGui::Text(_("Hardware Sequence"));
ImGui::EndMenuBar();
@ -7340,7 +7340,7 @@ void FurnaceGUI::drawInsEdit() {
}
if (ins->type==DIV_INS_SU) if (ImGui::BeginTabItem("Sound Unit")) {
P(ImGui::Checkbox(_("Switch roles of frequency and phase reset timer"),&ins->su.switchRoles));
if (ImGui::BeginChild("HWSeqSU",ImGui::GetContentRegionAvail(),true,ImGuiWindowFlags_MenuBar)) {
if (ImGui::BeginChild("HWSeqSU",ImGui::GetContentRegionAvail(),ImGuiChildFlags_Border,ImGuiWindowFlags_MenuBar)) {
ImGui::BeginMenuBar();
ImGui::Text(_("Hardware Sequence"));
ImGui::EndMenuBar();

View file

@ -316,7 +316,7 @@ void FurnaceGUI::drawMixer() {
hoveredPortSet=0x1fff;
hoveredSubPort=-1;
if (ImGui::BeginChild("Patchbay",ImVec2(0,0),true)) {
if (ImGui::BeginChild("Patchbay",ImVec2(0,0),ImGuiChildFlags_Border)) {
ImDrawList* dl=ImGui::GetWindowDrawList();
ImVec2 topPos=ImGui::GetCursorPos();
ImVec2 sysSize=calcPortSetSize(_("System"),displayHiddenPorts?DIV_MAX_OUTPUTS:e->getAudioDescGot().outChans,0);

View file

@ -130,7 +130,7 @@ void FurnaceGUI::drawNewSong() {
ImVec2 avail=ImGui::GetContentRegionAvail();
avail.y-=ImGui::GetFrameHeightWithSpacing();
if (ImGui::BeginChild("sysPickerC",avail,false,ImGuiWindowFlags_NoScrollWithMouse|ImGuiWindowFlags_NoScrollbar)) {
if (ImGui::BeginChild("sysPickerC",avail,0,ImGuiWindowFlags_NoScrollWithMouse|ImGuiWindowFlags_NoScrollbar)) {
if (newSongFirstFrame)
ImGui::SetKeyboardFocusHere();
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);

View file

@ -334,7 +334,7 @@ const char* specificControls[18]={
bool _subInit=false; \
ImVec2 settingsViewSize=ImGui::GetContentRegionAvail(); \
settingsViewSize.y-=ImGui::GetFrameHeight()+ImGui::GetStyle().WindowPadding.y; \
if (ImGui::BeginChild("SettingsView",settingsViewSize,false))
if (ImGui::BeginChild("SettingsView",settingsViewSize,0))
#define END_SECTION } \
ImGui::EndChild(); \
@ -2175,7 +2175,7 @@ void FurnaceGUI::drawSettings() {
if (ImGui::Button(_("Reset defaults"))) {
showWarning(_("Are you sure you want to reset the keyboard settings?"),GUI_WARN_RESET_KEYBINDS);
}
if (ImGui::BeginChild("##HotkeysList",ImVec2(0,0),false,ImGuiWindowFlags_HorizontalScrollbar)) {
if (ImGui::BeginChild("##HotkeysList",ImVec2(0,0),0,ImGuiWindowFlags_HorizontalScrollbar)) {
if (ImGui::TreeNode(_("Global hotkeys"))) {
KEYBIND_CONFIG_BEGIN("keysGlobal");

View file

@ -87,7 +87,7 @@ DivSystem FurnaceGUI::systemPicker(bool fullWidth) {
}
ImGui::EndTable();
}
if (ImGui::BeginChild("SysDesc",ImVec2(0.0f,150.0f*dpiScale),false,ImGuiWindowFlags_NoScrollbar|ImGuiWindowFlags_NoScrollWithMouse)) {
if (ImGui::BeginChild("SysDesc",ImVec2(0.0f,150.0f*dpiScale),0,ImGuiWindowFlags_NoScrollbar|ImGuiWindowFlags_NoScrollWithMouse)) {
if (hoveredSys!=DIV_SYSTEM_NULL) {
const DivSysDef* sysDef=e->getSystemDef(hoveredSys);
ImGui::TextWrapped("%s",sysDef->description);