Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
17aa17fb
Commit
17aa17fb
authored
Jul 21, 2010
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a wxWidgets 2.9.1 issue: incorrect wxBitmaps buttons sizes in Kicad manager.
parent
ea40d26a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
25 deletions
+20
-25
commandframe.cpp
kicad/commandframe.cpp
+19
-24
kicad.h
kicad/kicad.h
+1
-1
No files found.
kicad/commandframe.cpp
View file @
17aa17fb
...
@@ -70,43 +70,38 @@ void RIGHT_KM_FRAME::CreateCommandToolbar( void )
...
@@ -70,43 +70,38 @@ void RIGHT_KM_FRAME::CreateCommandToolbar( void )
{
{
wxBitmapButton
*
btn
;
wxBitmapButton
*
btn
;
wxWindow
*
parent
=
m_ButtPanel
;
btn
=
AddBitmapButton
(
ID_TO_EESCHEMA
,
wxBitmap
(
icon_eeschema_xpm
)
);
btn
=
new
wxBitmapButton
(
parent
,
ID_TO_EESCHEMA
,
wxBitmap
(
icon_eeschema_xpm
)
);
btn
->
SetToolTip
(
_
(
"EESchema (Schematic editor)"
)
);
btn
->
SetToolTip
(
_
(
"EESchema (Schematic editor)"
)
);
AddFastLaunch
(
btn
);
btn
=
new
wxBitmapButton
(
parent
,
ID_TO_CVPCB
,
wxBitmap
(
icon_cvpcb_xpm
)
);
btn
=
AddBitmapButton
(
ID_TO_CVPCB
,
wxBitmap
(
icon_cvpcb_xpm
)
);
btn
->
SetToolTip
(
_
(
"CVpcb (Components to modules)"
)
);
btn
->
SetToolTip
(
_
(
"CVpcb (Components to modules)"
)
);
AddFastLaunch
(
btn
);
btn
=
new
wxBitmapButton
(
parent
,
ID_TO_PCB
,
wxBitmap
(
a_icon_pcbnew_xpm
)
);
btn
=
AddBitmapButton
(
ID_TO_PCB
,
wxBitmap
(
a_icon_pcbnew_xpm
)
);
btn
->
SetToolTip
(
_
(
"PCBnew (PCB editor)"
)
);
btn
->
SetToolTip
(
_
(
"PCBnew (PCB editor)"
)
);
AddFastLaunch
(
btn
);
btn
=
new
wxBitmapButton
(
parent
,
ID_TO_GERBVIEW
,
wxBitmap
(
icon_gerbview_xpm
)
);
btn
=
AddBitmapButton
(
ID_TO_GERBVIEW
,
wxBitmap
(
icon_gerbview_xpm
)
);
btn
->
SetToolTip
(
_
(
"GerbView (Gerber viewer)"
)
);
btn
->
SetToolTip
(
_
(
"GerbView (Gerber viewer)"
)
);
AddFastLaunch
(
btn
);
btn
=
new
wxBitmapButton
(
parent
,
ID_TO_BITMAP_CONVERTER
,
btn
=
AddBitmapButton
(
ID_TO_BITMAP_CONVERTER
,
wxBitmap
(
bitmap2component_16x16_xpm
)
);
wxBitmap
(
bitmap2component_16x16_xpm
)
);
btn
->
SetToolTip
(
_
(
"Bitmap2Component (Bitmap converter to create logos)"
)
);
btn
->
SetToolTip
(
_
(
"Bitmap2Component (Bitmap converter to create logos)"
)
);
AddFastLaunch
(
btn
);
}
}
/****************************************************************/
/** Function AddBitmapButton
void
RIGHT_KM_FRAME
::
AddFastLaunch
(
wxBitmapButton
*
button
)
* add a Bitmap Button (fast launch button) to the buttons panel
/****************************************************************/
* @param aId = the button id
* @param aBitmap = the wxBitmap used to create the button
/** Function AddFastLaunch
* add a Bitmap Button (fast launch button) to the window
* @param button = wxBitmapButton to add to the window
*/
*/
wxBitmapButton
*
RIGHT_KM_FRAME
::
AddBitmapButton
(
wxWindowID
aId
,
const
wxBitmap
&
aBitmap
)
{
{
wxPoint
buttPos
=
m_ButtonLastPosition
;
wxPoint
buttPos
=
m_ButtonLastPosition
;
buttPos
.
y
-=
button
->
GetSize
().
GetHeight
();
wxSize
buttSize
;
button
->
Move
(
buttPos
);
int
btn_margin
=
8
;
m_ButtonLastPosition
.
x
+=
button
->
GetSize
().
GetWidth
()
+
m_ButtonSeparation
;
buttSize
.
x
=
aBitmap
.
GetWidth
()
+
btn_margin
;
buttSize
.
y
=
aBitmap
.
GetHeight
()
+
btn_margin
;
buttPos
.
y
-=
buttSize
.
y
;
wxBitmapButton
*
btn
=
new
wxBitmapButton
(
m_ButtPanel
,
aId
,
aBitmap
,
buttPos
,
buttSize
);
m_ButtonLastPosition
.
x
+=
buttSize
.
x
+
m_ButtonSeparation
;
return
btn
;
}
}
kicad/kicad.h
View file @
17aa17fb
...
@@ -159,7 +159,7 @@ public:
...
@@ -159,7 +159,7 @@ public:
private
:
private
:
void
CreateCommandToolbar
(
void
);
void
CreateCommandToolbar
(
void
);
void
AddFastLaunch
(
wxBitmapButton
*
button
);
wxBitmapButton
*
AddBitmapButton
(
wxWindowID
aId
,
const
wxBitmap
&
aBitmap
);
DECLARE_EVENT_TABLE
()
DECLARE_EVENT_TABLE
()
};
};
...
...
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