command palette: (breaking) attempt to center the window
This commit is contained in:
parent
e454433199
commit
60de8b0e90
2 changed files with 7 additions and 2 deletions
|
|
@ -51,7 +51,9 @@ void FurnaceGUI::drawPalette() {
|
|||
if (paletteFirstFrame)
|
||||
ImGui::SetKeyboardFocusHere();
|
||||
|
||||
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
||||
int width=ImGui::GetContentRegionAvail().x;
|
||||
|
||||
ImGui::SetNextItemWidth(width);
|
||||
|
||||
if (ImGui::InputTextWithHint("##CommandPaletteSearch","Search...",&paletteQuery) || paletteFirstFrame) {
|
||||
paletteSearchResults.clear();
|
||||
|
|
@ -81,7 +83,7 @@ void FurnaceGUI::drawPalette() {
|
|||
};
|
||||
}
|
||||
|
||||
if (ImGui::BeginChild("CommandPaletteList",ImVec2(312,216),false,0)) {
|
||||
if (ImGui::BeginChild("CommandPaletteList",ImVec2(width,canvasH*0.3),false,0)) {
|
||||
bool navigated=false;
|
||||
if (ImGui::IsKeyPressed(ImGuiKey_UpArrow) && curPaletteChoice>0) {
|
||||
curPaletteChoice-=1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue