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
ab2d11ee
Commit
ab2d11ee
authored
1 year ago
by
관우 안
Browse files
Options
Downloads
Patches
Plain Diff
MenuCreator.cpp 수정, 다양한 종류의 Menu를 수정해 MenuItem 형태로 Append시키고 폰트 변경 적용
parent
68899442
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/MenuCreator.cpp
+31
-7
31 additions, 7 deletions
src/MenuCreator.cpp
with
31 additions
and
7 deletions
src/MenuCreator.cpp
+
31
−
7
View file @
ab2d11ee
...
@@ -329,12 +329,20 @@ FormatLabelWithDisabledAccel(const CommandManager::CommandListEntry &entry)
...
@@ -329,12 +329,20 @@ FormatLabelWithDisabledAccel(const CommandManager::CommandListEntry &entry)
return
label
;
return
label
;
}
}
//추가된 코드
wxFont
fontB
(
wxFontInfo
(
10
).
FaceName
(
"Malgun Gothic"
).
Bold
());
void
MenuItemVisitor
::
VisitEntry
(
CommandManager
::
CommandListEntry
&
entry
,
void
MenuItemVisitor
::
VisitEntry
(
CommandManager
::
CommandListEntry
&
entry
,
const
MenuRegistry
::
Options
*
pOptions
)
const
MenuRegistry
::
Options
*
pOptions
)
{
{
if
(
!
pOptions
)
if
(
!
pOptions
)
{
// 추가된코드
wxMenuItem
*
menu_item
=
new
wxMenuItem
(
NULL
,
entry
.
id
,
entry
.
FormatLabelForMenu
());
menu_item
->
SetFont
(
fontB
);
CurrentMenu
()
->
Append
(
menu_item
);
// command list item
// command list item
CurrentMenu
()
->
Append
(
entry
.
id
,
entry
.
FormatLabelForMenu
());
//CurrentMenu()->Append(entry.id, entry.FormatLabelForMenu());
}
else
if
(
pOptions
->
global
)
else
if
(
pOptions
->
global
)
;
;
else
{
else
{
...
@@ -342,11 +350,22 @@ void MenuItemVisitor::VisitEntry(CommandManager::CommandListEntry &entry,
...
@@ -342,11 +350,22 @@ void MenuItemVisitor::VisitEntry(CommandManager::CommandListEntry &entry,
auto
label
=
FormatLabelWithDisabledAccel
(
entry
);
auto
label
=
FormatLabelWithDisabledAccel
(
entry
);
auto
&
checker
=
pOptions
->
checker
;
auto
&
checker
=
pOptions
->
checker
;
if
(
checker
)
{
if
(
checker
)
{
CurrentMenu
()
->
AppendCheckItem
(
ID
,
label
);
//추가된코드
wxMenuItem
*
menu_item
=
new
wxMenuItem
(
NULL
,
ID
,
label
,
wxEmptyString
,
wxITEM_CHECK
,
NULL
);
menu_item
->
SetFont
(
fontB
);
CurrentMenu
()
->
Append
(
menu_item
);
//CurrentMenu()->AppendCheckItem(ID, label);
CurrentMenu
()
->
Check
(
ID
,
checker
(
mProject
));
CurrentMenu
()
->
Check
(
ID
,
checker
(
mProject
));
}
}
else
else
{
CurrentMenu
()
->
Append
(
ID
,
label
);
//추가된 코드
wxMenuItem
*
menu_item
=
new
wxMenuItem
(
NULL
,
ID
,
label
);
menu_item
->
SetFont
(
fontB
);
CurrentMenu
()
->
Append
(
menu_item
);
//CurrentMenu()->Append(ID, label);
}
}
}
}
}
...
@@ -409,8 +428,13 @@ void MenuItemVisitor::EndSubMenu()
...
@@ -409,8 +428,13 @@ void MenuItemVisitor::EndSubMenu()
//Add the submenu to the current menu
//Add the submenu to the current menu
auto
name
=
MenuNames
().
back
().
Translation
();
auto
name
=
MenuNames
().
back
().
Translation
();
CurrentMenu
()
->
Append
(
0
,
name
,
tmpSubMenu
.
menu
.
release
(),
name
/* help string */
);
//추가된코드
wxMenuItem
*
menu_item
=
new
wxMenuItem
(
NULL
,
0
,
name
,
name
,
wxITEM_NORMAL
,
tmpSubMenu
.
menu
.
release
());
menu_item
->
SetFont
(
fontB
);
CurrentMenu
()
->
Append
(
menu_item
);
//CurrentMenu()->Append(0, name, tmpSubMenu.menu.release(), name /* help string */ );
mbSeparatorAllowed
=
true
;
mbSeparatorAllowed
=
true
;
}
}
...
...
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