Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
FOSS-2024-1-final
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AudacityFontProject
FOSS-2024-1-final
Commits
f07e40a4
Commit
f07e40a4
authored
6 years ago
by
James Crook
Browse files
Options
Downloads
Patches
Plain Diff
Bug 1983 - Preference updates do not preserve toolbar widths
parent
e4bdd68c
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/toolbars/ToolBar.cpp
+17
-4
17 additions, 4 deletions
src/toolbars/ToolBar.cpp
src/toolbars/ToolBar.h
+1
-0
1 addition, 0 deletions
src/toolbars/ToolBar.h
src/toolbars/ToolManager.cpp
+1
-0
1 addition, 0 deletions
src/toolbars/ToolManager.cpp
with
19 additions
and
4 deletions
src/toolbars/ToolBar.cpp
+
17
−
4
View file @
f07e40a4
...
...
@@ -459,6 +459,13 @@ void ToolBar::Create( wxWindow *parent )
mVisible
=
true
;
}
void
ToolBar
::
SetToDefaultSize
(){
wxSize
sz
;
sz
.
SetHeight
(
-
1
);
sz
.
SetWidth
(
GetInitialWidth
());
SetSize
(
sz
);
}
void
ToolBar
::
ReCreateButtons
()
{
wxSize
sz3
=
GetSize
();
...
...
@@ -519,12 +526,18 @@ void ToolBar::ReCreateButtons()
sz2
.
SetWidth
(
GetMinToolbarWidth
());
sz2
.
y
=
tbs
-
1
;
SetMinSize
(
sz2
);
// Initial size at least as big as minimum.
// sz2 is now the minimum size.
// sz3 is the size we were.
// When recreating buttons, we want to preserve size.
// But not if that makes the size too small.
// Size at least as big as minimum.
if
(
sz3
.
y
<
sz2
.
y
)
sz3
.
y
=
sz2
.
y
;
//
if( sz3.x < sz2.x )
sz3
.
x
=
GetInitialWidth
()
;
//sz.SetWidth();
if
(
sz3
.
x
<
sz2
.
x
)
sz3
.
x
=
sz2
.
x
;
SetSize
(
sz3
);
}
else
...
...
This diff is collapsed.
Click to expand it.
src/toolbars/ToolBar.h
+
1
−
0
View file @
f07e40a4
...
...
@@ -96,6 +96,7 @@ class ToolBar /* not final */ : public wxPanelWrapper
bool
AcceptsFocus
()
const
override
{
return
false
;
};
void
SetToDefaultSize
();
//NEW virtuals:
virtual
void
Create
(
wxWindow
*
parent
);
virtual
void
EnableDisableButtons
()
=
0
;
...
...
This diff is collapsed.
Click to expand it.
src/toolbars/ToolManager.cpp
+
1
−
0
View file @
f07e40a4
...
...
@@ -546,6 +546,7 @@ void ToolManager::Reset()
floater
->
Destroy
();
// Recreate bar buttons (and resize it)
bar
->
SetToDefaultSize
();
bar
->
ReCreateButtons
();
bar
->
EnableDisableButtons
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment