Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
htop
Commits
3cfbcb72
Commit
3cfbcb72
authored
Nov 02, 2015
by
Hisham Muhammad
Browse files
Highlight moving meters in a different color.
parent
f187be92
Changes
2
Hide whitespace changes
Inline
Side-by-side
ColumnsPanel.c
View file @
3cfbcb72
...
@@ -54,6 +54,7 @@ static HandlerResult ColumnsPanel_eventHandler(Panel* super, int ch) {
...
@@ -54,6 +54,7 @@ static HandlerResult ColumnsPanel_eventHandler(Panel* super, int ch) {
{
{
if
(
selected
<
size
-
1
)
{
if
(
selected
<
size
-
1
)
{
this
->
moving
=
!
(
this
->
moving
);
this
->
moving
=
!
(
this
->
moving
);
Panel_setSelectionColor
(
super
,
this
->
moving
?
CRT_colors
[
PANEL_SELECTION_FOLLOW
]
:
CRT_colors
[
PANEL_SELECTION_FOCUS
]);
((
ListItem
*
)
Panel_getSelected
(
super
))
->
moving
=
this
->
moving
;
((
ListItem
*
)
Panel_getSelected
(
super
))
->
moving
=
this
->
moving
;
result
=
HANDLED
;
result
=
HANDLED
;
}
}
...
...
MetersPanel.c
View file @
3cfbcb72
...
@@ -9,6 +9,7 @@ in the source distribution for its full text.
...
@@ -9,6 +9,7 @@ in the source distribution for its full text.
#include <stdlib.h>
#include <stdlib.h>
#include <assert.h>
#include <assert.h>
#include "CRT.h"
/*{
/*{
#include "Panel.h"
#include "Panel.h"
...
@@ -51,8 +52,10 @@ void MetersPanel_setMoving(MetersPanel* this, bool moving) {
...
@@ -51,8 +52,10 @@ void MetersPanel_setMoving(MetersPanel* this, bool moving) {
this
->
moving
=
moving
;
this
->
moving
=
moving
;
((
ListItem
*
)
Panel_getSelected
(
super
))
->
moving
=
moving
;
((
ListItem
*
)
Panel_getSelected
(
super
))
->
moving
=
moving
;
if
(
!
moving
)
{
if
(
!
moving
)
{
Panel_setSelectionColor
(
super
,
CRT_colors
[
PANEL_SELECTION_FOCUS
]);
Panel_setDefaultBar
(
super
);
Panel_setDefaultBar
(
super
);
}
else
{
}
else
{
Panel_setSelectionColor
(
super
,
CRT_colors
[
PANEL_SELECTION_FOLLOW
]);
super
->
currentBar
=
Meters_movingBar
;
super
->
currentBar
=
Meters_movingBar
;
}
}
}
}
...
...
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