revert: Make pattern editor scroll bar look more like all other scrollbars
This commit is contained in:
parent
0297c267e9
commit
0db0bc53fa
@ -1211,9 +1211,13 @@ void TextEditor::Render(const char *aTitle, const ImVec2 &aSize, bool aBorder) {
|
|||||||
mTextChanged = false;
|
mTextChanged = false;
|
||||||
mCursorPositionChanged = false;
|
mCursorPositionChanged = false;
|
||||||
|
|
||||||
|
auto scrollBg = ImGui::GetStyleColorVec4(ImGuiCol_ScrollbarBg);
|
||||||
|
scrollBg.w = 0.0f;
|
||||||
auto scrollBarSize = ImGui::GetStyle().ScrollbarSize;
|
auto scrollBarSize = ImGui::GetStyle().ScrollbarSize;
|
||||||
ImGui::PushStyleColor(ImGuiCol_ChildBg, ImGui::ColorConvertU32ToFloat4(mPalette[(int) PaletteIndex::Background]));
|
ImGui::PushStyleColor(ImGuiCol_ChildBg, ImGui::ColorConvertU32ToFloat4(mPalette[(int) PaletteIndex::Background]));
|
||||||
|
ImGui::PushStyleColor(ImGuiCol_ScrollbarBg, ImGui::ColorConvertFloat4ToU32(scrollBg));
|
||||||
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0, 0));
|
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0, 0));
|
||||||
|
ImGui::PushStyleVar(ImGuiStyleVar_ScrollbarRounding,0);
|
||||||
ImGui::PushStyleVar(ImGuiStyleVar_ScrollbarSize,scrollBarSize);
|
ImGui::PushStyleVar(ImGuiStyleVar_ScrollbarSize,scrollBarSize);
|
||||||
|
|
||||||
auto position = ImGui::GetCursorScreenPos();
|
auto position = ImGui::GetCursorScreenPos();
|
||||||
@ -1268,8 +1272,8 @@ void TextEditor::Render(const char *aTitle, const ImVec2 &aSize, bool aBorder) {
|
|||||||
if (!mIgnoreImGuiChild)
|
if (!mIgnoreImGuiChild)
|
||||||
ImGui::EndChild();
|
ImGui::EndChild();
|
||||||
|
|
||||||
ImGui::PopStyleVar(2);
|
ImGui::PopStyleVar(3);
|
||||||
ImGui::PopStyleColor();
|
ImGui::PopStyleColor(2);
|
||||||
|
|
||||||
mWithinRender = false;
|
mWithinRender = false;
|
||||||
ImGui::SetCursorScreenPos(ImVec2(position.x,position.y+aSize.y-1));
|
ImGui::SetCursorScreenPos(ImVec2(position.x,position.y+aSize.y-1));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user