Popups are now windows also (broken!)

This commit is contained in:
Juan Linietsky
2020-03-12 09:37:40 -03:00
parent 543fb1c4da
commit 441f1a5fe9
159 changed files with 3311 additions and 3285 deletions

View File

@ -74,8 +74,8 @@ void SplitContainer::_resort() {
bool second_expanded = (vertical ? second->get_v_size_flags() : second->get_h_size_flags()) & SIZE_EXPAND;
// Determine the separation between items
Ref<Texture2D> g = get_icon("grabber");
int sep = get_constant("separation");
Ref<Texture2D> g = get_theme_icon("grabber");
int sep = get_theme_constant("separation");
sep = (dragger_visibility != DRAGGER_HIDDEN_COLLAPSED) ? MAX(sep, vertical ? g->get_height() : g->get_width()) : 0;
// Compute the minimum size
@ -123,8 +123,8 @@ Size2 SplitContainer::get_minimum_size() const {
/* Calculate MINIMUM SIZE */
Size2i minimum;
Ref<Texture2D> g = get_icon("grabber");
int sep = get_constant("separation");
Ref<Texture2D> g = get_theme_icon("grabber");
int sep = get_theme_constant("separation");
sep = (dragger_visibility != DRAGGER_HIDDEN_COLLAPSED) ? MAX(sep, vertical ? g->get_height() : g->get_width()) : 0;
for (int i = 0; i < 2; i++) {
@ -167,7 +167,7 @@ void SplitContainer::_notification(int p_what) {
case NOTIFICATION_MOUSE_EXIT: {
mouse_inside = false;
if (get_constant("autohide"))
if (get_theme_constant("autohide"))
update();
} break;
case NOTIFICATION_DRAW: {
@ -175,14 +175,14 @@ void SplitContainer::_notification(int p_what) {
if (!_getch(0) || !_getch(1))
return;
if (collapsed || (!dragging && !mouse_inside && get_constant("autohide")))
if (collapsed || (!dragging && !mouse_inside && get_theme_constant("autohide")))
return;
if (dragger_visibility != DRAGGER_VISIBLE)
return;
int sep = dragger_visibility != DRAGGER_HIDDEN_COLLAPSED ? get_constant("separation") : 0;
Ref<Texture2D> tex = get_icon("grabber");
int sep = dragger_visibility != DRAGGER_HIDDEN_COLLAPSED ? get_theme_constant("separation") : 0;
Ref<Texture2D> tex = get_theme_icon("grabber");
Size2 size = get_size();
if (vertical)
@ -210,7 +210,7 @@ void SplitContainer::_gui_input(const Ref<InputEvent> &p_event) {
if (mb->is_pressed()) {
int sep = get_constant("separation");
int sep = get_theme_constant("separation");
if (vertical) {
@ -242,14 +242,14 @@ void SplitContainer::_gui_input(const Ref<InputEvent> &p_event) {
bool mouse_inside_state = false;
if (vertical)
mouse_inside_state = mm->get_position().y > middle_sep && mm->get_position().y < middle_sep + get_constant("separation");
mouse_inside_state = mm->get_position().y > middle_sep && mm->get_position().y < middle_sep + get_theme_constant("separation");
else
mouse_inside_state = mm->get_position().x > middle_sep && mm->get_position().x < middle_sep + get_constant("separation");
mouse_inside_state = mm->get_position().x > middle_sep && mm->get_position().x < middle_sep + get_theme_constant("separation");
if (mouse_inside != mouse_inside_state) {
mouse_inside = mouse_inside_state;
if (get_constant("autohide"))
if (get_theme_constant("autohide"))
update();
}
@ -270,7 +270,7 @@ Control::CursorShape SplitContainer::get_cursor_shape(const Point2 &p_pos) const
if (!collapsed && _getch(0) && _getch(1) && dragger_visibility == DRAGGER_VISIBLE) {
int sep = get_constant("separation");
int sep = get_theme_constant("separation");
if (vertical) {