GUI: use ImGuiChildFlags_Border
This commit is contained in:
parent
d701596972
commit
2fc050c6b4
|
@ -249,7 +249,7 @@ void FurnaceGUI::drawPalette() {
|
||||||
ImVec2 avail=ImGui::GetContentRegionAvail();
|
ImVec2 avail=ImGui::GetContentRegionAvail();
|
||||||
avail.y-=ImGui::GetFrameHeightWithSpacing();
|
avail.y-=ImGui::GetFrameHeightWithSpacing();
|
||||||
|
|
||||||
if (ImGui::BeginChild("CommandPaletteList",avail,false,0)) {
|
if (ImGui::BeginChild("CommandPaletteList",avail,0,0)) {
|
||||||
bool navigated=false;
|
bool navigated=false;
|
||||||
if (ImGui::IsKeyPressed(ImGuiKey_UpArrow) && curPaletteChoice>0) {
|
if (ImGui::IsKeyPressed(ImGuiKey_UpArrow) && curPaletteChoice>0) {
|
||||||
curPaletteChoice-=1;
|
curPaletteChoice-=1;
|
||||||
|
|
|
@ -761,7 +761,7 @@ void FurnaceGUI::drawDebug() {
|
||||||
auto DrawSpot=[&](const CursorJumpPoint& spot) {
|
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);
|
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)) {
|
if (ImGui::BeginTable("##CursorUndoDebug", 2, ImGuiTableFlags_Borders|ImGuiTableFlags_SizingStretchSame)) {
|
||||||
for (size_t row=0; row<MAX(cursorUndoHist.size(),cursorRedoHist.size()); ++row) {
|
for (size_t row=0; row<MAX(cursorUndoHist.size(),cursorRedoHist.size()); ++row) {
|
||||||
ImGui::TableNextRow();
|
ImGui::TableNextRow();
|
||||||
|
|
|
@ -6002,7 +6002,7 @@ bool FurnaceGUI::loop() {
|
||||||
ImVec2 romLogSize=ImGui::GetContentRegionAvail();
|
ImVec2 romLogSize=ImGui::GetContentRegionAvail();
|
||||||
romLogSize.y-=ImGui::GetFrameHeightWithSpacing();
|
romLogSize.y-=ImGui::GetFrameHeightWithSpacing();
|
||||||
if (romLogSize.y<60.0f*dpiScale) romLogSize.y=60.0f*dpiScale;
|
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();
|
pendingExport->logLock.lock();
|
||||||
ImGui::PushFont(patFont);
|
ImGui::PushFont(patFont);
|
||||||
for (String& i: pendingExport->exportLog) {
|
for (String& i: pendingExport->exportLog) {
|
||||||
|
|
|
@ -7002,7 +7002,7 @@ void FurnaceGUI::drawInsEdit() {
|
||||||
ImGui::EndTable();
|
ImGui::EndTable();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ImGui::BeginChild("HWSeq",ImGui::GetContentRegionAvail(),true,ImGuiWindowFlags_MenuBar)) {
|
if (ImGui::BeginChild("HWSeq",ImGui::GetContentRegionAvail(),ImGuiChildFlags_Border,ImGuiWindowFlags_MenuBar)) {
|
||||||
ImGui::BeginMenuBar();
|
ImGui::BeginMenuBar();
|
||||||
ImGui::Text(_("Hardware Sequence"));
|
ImGui::Text(_("Hardware Sequence"));
|
||||||
ImGui::EndMenuBar();
|
ImGui::EndMenuBar();
|
||||||
|
@ -7340,7 +7340,7 @@ void FurnaceGUI::drawInsEdit() {
|
||||||
}
|
}
|
||||||
if (ins->type==DIV_INS_SU) if (ImGui::BeginTabItem("Sound Unit")) {
|
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));
|
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::BeginMenuBar();
|
||||||
ImGui::Text(_("Hardware Sequence"));
|
ImGui::Text(_("Hardware Sequence"));
|
||||||
ImGui::EndMenuBar();
|
ImGui::EndMenuBar();
|
||||||
|
|
|
@ -316,7 +316,7 @@ void FurnaceGUI::drawMixer() {
|
||||||
hoveredPortSet=0x1fff;
|
hoveredPortSet=0x1fff;
|
||||||
hoveredSubPort=-1;
|
hoveredSubPort=-1;
|
||||||
|
|
||||||
if (ImGui::BeginChild("Patchbay",ImVec2(0,0),true)) {
|
if (ImGui::BeginChild("Patchbay",ImVec2(0,0),ImGuiChildFlags_Border)) {
|
||||||
ImDrawList* dl=ImGui::GetWindowDrawList();
|
ImDrawList* dl=ImGui::GetWindowDrawList();
|
||||||
ImVec2 topPos=ImGui::GetCursorPos();
|
ImVec2 topPos=ImGui::GetCursorPos();
|
||||||
ImVec2 sysSize=calcPortSetSize(_("System"),displayHiddenPorts?DIV_MAX_OUTPUTS:e->getAudioDescGot().outChans,0);
|
ImVec2 sysSize=calcPortSetSize(_("System"),displayHiddenPorts?DIV_MAX_OUTPUTS:e->getAudioDescGot().outChans,0);
|
||||||
|
|
|
@ -130,7 +130,7 @@ void FurnaceGUI::drawNewSong() {
|
||||||
ImVec2 avail=ImGui::GetContentRegionAvail();
|
ImVec2 avail=ImGui::GetContentRegionAvail();
|
||||||
avail.y-=ImGui::GetFrameHeightWithSpacing();
|
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)
|
if (newSongFirstFrame)
|
||||||
ImGui::SetKeyboardFocusHere();
|
ImGui::SetKeyboardFocusHere();
|
||||||
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
||||||
|
|
|
@ -334,7 +334,7 @@ const char* specificControls[18]={
|
||||||
bool _subInit=false; \
|
bool _subInit=false; \
|
||||||
ImVec2 settingsViewSize=ImGui::GetContentRegionAvail(); \
|
ImVec2 settingsViewSize=ImGui::GetContentRegionAvail(); \
|
||||||
settingsViewSize.y-=ImGui::GetFrameHeight()+ImGui::GetStyle().WindowPadding.y; \
|
settingsViewSize.y-=ImGui::GetFrameHeight()+ImGui::GetStyle().WindowPadding.y; \
|
||||||
if (ImGui::BeginChild("SettingsView",settingsViewSize,false))
|
if (ImGui::BeginChild("SettingsView",settingsViewSize,0))
|
||||||
|
|
||||||
#define END_SECTION } \
|
#define END_SECTION } \
|
||||||
ImGui::EndChild(); \
|
ImGui::EndChild(); \
|
||||||
|
@ -2175,7 +2175,7 @@ void FurnaceGUI::drawSettings() {
|
||||||
if (ImGui::Button(_("Reset defaults"))) {
|
if (ImGui::Button(_("Reset defaults"))) {
|
||||||
showWarning(_("Are you sure you want to reset the keyboard settings?"),GUI_WARN_RESET_KEYBINDS);
|
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"))) {
|
if (ImGui::TreeNode(_("Global hotkeys"))) {
|
||||||
KEYBIND_CONFIG_BEGIN("keysGlobal");
|
KEYBIND_CONFIG_BEGIN("keysGlobal");
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,7 @@ DivSystem FurnaceGUI::systemPicker(bool fullWidth) {
|
||||||
}
|
}
|
||||||
ImGui::EndTable();
|
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) {
|
if (hoveredSys!=DIV_SYSTEM_NULL) {
|
||||||
const DivSysDef* sysDef=e->getSystemDef(hoveredSys);
|
const DivSysDef* sysDef=e->getSystemDef(hoveredSys);
|
||||||
ImGui::TextWrapped("%s",sysDef->description);
|
ImGui::TextWrapped("%s",sysDef->description);
|
||||||
|
|
Loading…
Reference in a new issue