summaryrefslogtreecommitdiff
path: root/scene/main/viewport.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-07-28 18:24:07 +0200
committerGitHub <noreply@github.com>2021-07-28 18:24:07 +0200
commit60eb508fbb9ddd30fa567f183f8f50b74af38cd6 (patch)
tree7233e7019c11b768dcd2e393c257d9b5455fa858 /scene/main/viewport.cpp
parent684994241937e9833e35b785a23b6b860abfde38 (diff)
parent79fc188fc49ac7cdecf362fb027263d27d289669 (diff)
Merge pull request #50961 from YeldhamDev/embed_windows_fixes
Multiple cosmetic fixes for embedded windows
Diffstat (limited to 'scene/main/viewport.cpp')
-rw-r--r--scene/main/viewport.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 27e42db1bd..7b74d049fb 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -249,7 +249,7 @@ void Viewport::_sub_window_update(Window *p_window) {
Rect2i r = Rect2i(p_window->get_position(), sw.window->get_size());
if (!p_window->get_flag(Window::FLAG_BORDERLESS)) {
- Ref<StyleBox> panel = p_window->get_theme_stylebox(SNAME("panel_window"));
+ Ref<StyleBox> panel = p_window->get_theme_stylebox(SNAME("embedded_border"));
panel->draw(sw.canvas_item, r);
// Draw the title bar text.
@@ -273,9 +273,8 @@ void Viewport::_sub_window_update(Window *p_window) {
}
title_text.draw(sw.canvas_item, r.position + Point2(x, y), title_color);
- bool hl = gui.subwindow_focused == sw.window && gui.subwindow_drag == SUB_WINDOW_DRAG_CLOSE && gui.subwindow_drag_close_inside;
-
- Ref<Texture2D> close_icon = p_window->get_theme_icon(hl ? "close_highlight" : "close");
+ bool pressed = gui.subwindow_focused == sw.window && gui.subwindow_drag == SUB_WINDOW_DRAG_CLOSE && gui.subwindow_drag_close_inside;
+ Ref<Texture2D> close_icon = p_window->get_theme_icon(pressed ? "close_pressed" : "close");
close_icon->draw(sw.canvas_item, r.position + Vector2(r.size.width - close_h_ofs, -close_v_ofs));
}