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
d958f92c
Commit
d958f92c
authored
Feb 06, 2013
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Kicad manager: fix a minor issue noticeable on Kubuntu 12.04 (bad size of buttons area)
parent
41064434
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
18 deletions
+12
-18
commandframe.cpp
kicad/commandframe.cpp
+12
-18
No files found.
kicad/commandframe.cpp
View file @
d958f92c
...
...
@@ -40,7 +40,6 @@ RIGHT_KM_FRAME::RIGHT_KM_FRAME( KICAD_MANAGER_FRAME* parent ) :
{
m_Parent
=
parent
;
m_MessagesBox
=
NULL
;
m_ButtPanel
=
new
wxPanel
(
this
,
wxID_ANY
);
m_bitmapButtons_maxHeigth
=
0
;
m_ButtonSeparation
=
10
;
// control of command buttons position
m_ButtonsListPosition
.
x
=
m_ButtonSeparation
;
...
...
@@ -48,8 +47,9 @@ RIGHT_KM_FRAME::RIGHT_KM_FRAME( KICAD_MANAGER_FRAME* parent ) :
m_ButtonLastPosition
=
m_ButtonsListPosition
;
// Add bitmap buttons to launch KiCad utilities:
m_ButtPanel
=
new
wxPanel
(
this
,
wxID_ANY
);
CreateCommandToolbar
();
m_ButtonsPanelHeight
=
m_ButtonsListPosition
.
y
+
m_bitmapButtons_maxHeigth
+
10
;
m_ButtonsPanelHeight
=
m_ButtonsListPosition
.
y
+
m_bitmapButtons_maxHeigth
+
m_ButtonSeparation
;
// Add the wxTextCtrl showing all messages from KiCad:
m_MessagesBox
=
new
wxTextCtrl
(
this
,
wxID_ANY
,
wxEmptyString
,
...
...
@@ -61,23 +61,17 @@ RIGHT_KM_FRAME::RIGHT_KM_FRAME( KICAD_MANAGER_FRAME* parent ) :
void
RIGHT_KM_FRAME
::
OnSize
(
wxSizeEvent
&
event
)
{
#define EXTRA_MARGE 4
wxSize
wsize
=
GetClientSize
();
wsize
.
x
-=
EXTRA_MARGE
;
wsize
.
y
-=
m_ButtonsPanelHeight
+
EXTRA_MARGE
;
wxPoint
wpos
;
wpos
.
x
=
EXTRA_MARGE
/
2
;
wpos
.
y
=
m_ButtonsPanelHeight
+
(
EXTRA_MARGE
/
2
);
if
(
m_MessagesBox
)
{
m_MessagesBox
->
SetSize
(
wsize
);
m_MessagesBox
->
SetPosition
(
wpos
);
}
wxSize
wsize
;
wsize
.
x
=
GetClientSize
().
x
;
wpos
.
y
=
EXTRA_MARGE
/
2
;
m_ButtPanel
->
SetPosition
(
wpos
);
wsize
.
y
-=
m_ButtonsPanelHeight
-
EXTRA_MARGE
;
// Fix size of buttons area
wsize
.
y
=
m_ButtonsPanelHeight
;
m_ButtPanel
->
SetSize
(
wsize
);
m_ButtPanel
->
Refresh
();
// Fix position and size of the message area, below the buttons area
wsize
.
y
=
GetClientSize
().
y
-
m_ButtonsPanelHeight
;
m_MessagesBox
->
SetSize
(
wsize
);
m_MessagesBox
->
SetPosition
(
wxPoint
(
0
,
m_ButtonsPanelHeight
)
);
event
.
Skip
();
}
...
...
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