Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Gauthier Quesnel
irritator
Commits
33871967
Commit
33871967
authored
Apr 22, 2020
by
Gauthier Quesnel
Browse files
gui: fix load/save model box sizes
parent
4ffe3c65
Pipeline
#11509
passed with stage
in 45 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/gui/dialog-file.cpp
View file @
33871967
...
...
@@ -215,7 +215,7 @@ load_file_dialog(std::filesystem::path& out)
if
(
!
path_click
)
{
ImVec2
size
=
ImGui
::
GetContentRegionMax
();
size
.
y
/
=
1.5
f
;
size
.
y
*
=
0.8
f
;
ImGui
::
BeginChild
(
"##select_files"
,
size
);
...
...
@@ -323,10 +323,9 @@ save_file_dialog(std::filesystem::path& out)
if
(
!
path_click
)
{
ImVec2
size
=
ImGui
::
GetContentRegionMax
();
size
.
y
/
=
1.5
f
;
size
.
y
*
=
0.8
f
;
ImGui
::
BeginChild
(
"##select_files"
,
size
);
if
(
ImGui
::
Selectable
(
"..##select_file"
,
(
fd
.
selected
==
".."
)))
{
if
(
next
.
empty
())
{
next
=
fd
.
current
.
parent_path
();
...
...
app/gui/node-editor.cpp
View file @
33871967
...
...
@@ -781,6 +781,8 @@ struct editor
if
(
show_load_file_dialog
)
{
static
std
::
string
out
;
auto
size
=
ImGui
::
GetContentRegionMax
();
ImGui
::
SetNextWindowSize
(
ImVec2
(
size
.
x
*
0.7
f
,
size
.
y
*
0.7
f
));
ImGui
::
OpenPopup
(
"Select file path to load"
);
if
(
load_file_dialog
(
path
))
{
...
...
@@ -800,6 +802,8 @@ struct editor
ImGui
::
OpenPopup
(
"Select file path to save"
);
auto
size
=
ImGui
::
GetContentRegionMax
();
ImGui
::
SetNextWindowSize
(
ImVec2
(
size
.
x
*
0.7
f
,
size
.
y
*
0.7
f
));
if
(
save_file_dialog
(
path
))
{
show_save_file_dialog
=
false
;
log_w
.
log
(
5
,
"Save file to %s
\n
"
,
path
.
string
().
c_str
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment