Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
magicseteditor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
magicseteditor
Commits
8b698c47
Commit
8b698c47
authored
Jan 21, 2011
by
twanvl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix layout problems with blinking tabBar icons in wx2.6/vc7.1
parent
d5565ad5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
src/gui/set/window.cpp
src/gui/set/window.cpp
+19
-2
No files found.
src/gui/set/window.cpp
View file @
8b698c47
...
...
@@ -139,7 +139,7 @@ SetWindow::SetWindow(Window* parent, const SetP& set)
tb
->
Realize
();
// tab bar, sizer
wxToolBar
*
tabBar
=
new
wxToolBar
(
this
,
ID_TAB_BAR
,
wxDefaultPosition
,
wxDefaultSize
,
wxTB_FLAT
|
wxNO_BORDER
|
wxTB_HORIZONTAL
|
wxTB_HORZ_TEXT
);
wxToolBar
*
tabBar
=
new
wxToolBar
(
this
,
ID_TAB_BAR
,
wxDefaultPosition
,
wxDefaultSize
,
wxTB_FLAT
|
wxNO_BORDER
|
wxTB_HORIZONTAL
|
wxTB_HORZ_TEXT
|
wxTB_NOALIGN
);
wxSizer
*
s
=
new
wxBoxSizer
(
wxVERTICAL
);
s
->
Add
(
tabBar
,
0
,
wxEXPAND
|
wxBOTTOM
,
3
);
SetSizer
(
s
);
...
...
@@ -256,11 +256,28 @@ void SetWindow::selectPanel(int id) {
current_panel
->
SetFocus
();
}
void
toolbar_SetToolNormalBitmap
(
wxToolBar
*
toolbar
,
int
id
,
wxBitmap
const
&
bitmap
)
{
#if wxVERSION_NUMBER < 2800
// copied from wx2.8.11, tbar95.cpp
wxToolBarToolBase
*
tool
=
wx_static_cast
(
wxToolBarToolBase
*
,
toolbar
->
FindById
(
id
));
if
(
tool
)
{
tool
->
SetNormalBitmap
(
bitmap
);
toolbar
->
Realize
();
}
#else
toolbar
->
SetToolNormalBitmap
(
id
,
bitmap
);
#endif
}
void
SetWindow
::
setPanelIcon
(
SetWindowPanel
*
panel
,
wxBitmap
const
&
icon
)
{
for
(
size_t
i
=
0
;
i
<
panels
.
size
()
;
++
i
)
{
if
(
panels
[
i
]
==
panel
)
{
wxToolBar
*
tabBar
=
(
wxToolBar
*
)
FindWindow
(
ID_TAB_BAR
);
tabBar
->
SetToolNormalBitmap
(
ID_WINDOW_MIN
+
i
,
icon
);
toolbar_SetToolNormalBitmap
(
tabBar
,
ID_WINDOW_MIN
+
(
int
)
i
,
icon
);
#if wxVERSION_NUMBER < 2800
// This is needed at least in wx2.6, other versions seem not to need it, but maybe they do
Layout
();
#endif
// TODO: this could be done better, wx requires a full new Realize of the toolbar, but on win32 a single message would do
// if only we could set up the imagelist correctly.
return
;
...
...
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