Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
3325c274
Commit
3325c274
authored
May 10, 2013
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed visual state, fixed check state indication of main menu
parent
bdf736fc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
QGCToolBar.cc
src/ui/QGCToolBar.cc
+9
-2
QGCToolBar.h
src/ui/QGCToolBar.h
+2
-0
No files found.
src/ui/QGCToolBar.cc
View file @
3325c274
...
...
@@ -197,7 +197,7 @@ void QGCToolBar::setPerspectiveChangeActions(const QList<QAction*> &actions)
first
->
setToolButtonStyle
(
Qt
::
ToolButtonTextBesideIcon
);
first
->
setCheckable
(
true
);
connect
(
first
,
SIGNAL
(
clicked
(
bool
)),
actions
.
first
(),
SIGNAL
(
triggered
(
bool
)));
first
->
setStyleSheet
(
"QToolButton { min-width: 60px; color: #222222; background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #A2A3A4, stop: 1 #B6B7B8); margin-left: 8px; margin-right: 0px; border-radius: 0px; border : 0px solid blue; border-bottom-left-radius: 6px; border-top-left-radius: 6px; border-left: 1px solid #484848; border-top: 1px solid #484848; border-bottom: 1px solid #484848; } QToolButton:checked { background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #555555, stop: 1 #787878); color: #DDDDDD; }"
);
first
->
setStyleSheet
(
"QToolButton { min-width: 60px; color: #222222; background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #A2A3A4, stop: 1 #B6B7B8); margin-left: 8px; margin-right: 0px;
padding-left: 4px; padding-right: 8px;
border-radius: 0px; border : 0px solid blue; border-bottom-left-radius: 6px; border-top-left-radius: 6px; border-left: 1px solid #484848; border-top: 1px solid #484848; border-bottom: 1px solid #484848; } QToolButton:checked { background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #555555, stop: 1 #787878); color: #DDDDDD; }"
);
addWidget
(
first
);
group
->
addButton
(
first
);
...
...
@@ -247,15 +247,22 @@ void QGCToolBar::setPerspectiveChangeAdvancedActions(const QList<QAction*> &acti
menu
->
addAction
(
actions
.
at
(
i
));
}
menu
->
setStyleSheet
(
"QMenu { font-weight: bold; min-width: 70px; color: #222222; background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #A2A3A4, stop: 1 #B6B7B8); border: 1px solid #484848; } QMenu:checked { background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #555555, stop: 1 #787878); color: #DDDDDD; }"
);
menu
->
setStyleSheet
(
"QMenu { font-weight: bold; min-width: 70px; color: #222222; background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #A2A3A4, stop: 1 #B6B7B8); border: 1px solid #484848; } QMenu:
:item:
checked { background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #555555, stop: 1 #787878); color: #DDDDDD; }"
);
advancedButton
->
setMenu
(
menu
);
connect
(
menu
,
SIGNAL
(
triggered
(
QAction
*
)),
this
,
SLOT
(
advancedActivityTriggered
(
QAction
*
)));
}
else
{
qDebug
()
<<
__FILE__
<<
__LINE__
<<
"Not enough perspective change actions provided"
;
}
}
void
QGCToolBar
::
advancedActivityTriggered
(
QAction
*
action
)
{
if
(
action
->
isChecked
())
advancedButton
->
setChecked
(
true
);
}
void
QGCToolBar
::
setActiveUAS
(
UASInterface
*
active
)
{
// Do nothing if system is the same or NULL
...
...
src/ui/QGCToolBar.h
View file @
3325c274
...
...
@@ -78,6 +78,8 @@ public slots:
void
connectLink
(
bool
connect
);
/** @brief Clear status string */
void
clearStatusString
();
/** @brief Set an activity action as checked in menu */
void
advancedActivityTriggered
(
QAction
*
action
);
protected:
void
createCustomWidgets
();
...
...
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