|
@@ -969,14 +969,16 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int
|
|
for (int i = from; i < to; i++) {
|
|
for (int i = from; i < to; i++) {
|
|
if (i == p_page) {
|
|
if (i == p_page) {
|
|
Button *current = memnew(Button);
|
|
Button *current = memnew(Button);
|
|
- current->set_text(itos(i + 1));
|
|
|
|
|
|
+ // Keep the extended padding for the currently active page (see below).
|
|
|
|
+ current->set_text(vformat(" %d ", i + 1));
|
|
current->set_disabled(true);
|
|
current->set_disabled(true);
|
|
current->set_focus_mode(Control::FOCUS_NONE);
|
|
current->set_focus_mode(Control::FOCUS_NONE);
|
|
|
|
|
|
hbc->add_child(current);
|
|
hbc->add_child(current);
|
|
} else {
|
|
} else {
|
|
Button *current = memnew(Button);
|
|
Button *current = memnew(Button);
|
|
- current->set_text(itos(i + 1));
|
|
|
|
|
|
+ // Add padding to make page number buttons easier to click.
|
|
|
|
+ current->set_text(vformat(" %d ", i + 1));
|
|
current->connect("pressed", callable_mp(this, &EditorAssetLibrary::_search), varray(i));
|
|
current->connect("pressed", callable_mp(this, &EditorAssetLibrary::_search), varray(i));
|
|
|
|
|
|
hbc->add_child(current);
|
|
hbc->add_child(current);
|