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
Librem5
gnome-usage
Commits
fec83649
Commit
fec83649
authored
Oct 25, 2016
by
Petr Štětka
Browse files
Styling sidebar.
parent
2fdc793c
Changes
7
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
fec83649
...
...
@@ -22,4 +22,4 @@ Actual version is 0.0.5
Code is under GNU GPLv3 license.
##Design:
<img
src=
"https://rawgit.com/gnome-design-team/gnome-mockups/master/usage/usage
.sv
g"
>
<img
src=
"https://raw
.
git
hubusercontent
.com/gnome-design-team/gnome-mockups/master/usage/usage
-wires.pn
g"
>
build/src/gnome-usage
View file @
fec83649
No preview for this file type
gnome-usage.avprj
View file @
fec83649
...
...
@@ -54,13 +54,14 @@ h_folder: /usr/include/libgtop-2.0
*po: po
translate: c src/better-box.c
*translate: vala src/
performance-view
.vala
*translate: vala src/
graph-switcher-button
.vala
*translate: vala src/settings.vala
*translate: vala src/process-list.vala
*translate: vala src/header-bar.vala
*translate: vala src/memory-sub-view.vala
*translate: vala src/network-sub-view.vala
*translate: vala src/cpu-graph.vala
*translate: vala src/performance-view.vala
*translate: vala src/memory-graph-table.vala
*translate: vala src/system-monitor.vala
*translate: vala src/view.vala
...
...
@@ -70,7 +71,6 @@ translate: c src/better-box.c
*translate: vala src/graph-stack-switcher.vala
*translate: vala src/cpu-sub-view.vala
*translate: vala src/cpu-graph-table.vala
*translate: vala src/graph-switcher-button.vala
*translate: vala src/application.vala
*translate: vala src/memory-graph.vala
*translate: vala src/storage-view.vala
...
...
screenshot.png
View replaced file @
2fdc793c
View file @
fec83649
82.9 KB
|
W:
|
H:
94.5 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/graph-switcher-button.vala
View file @
fec83649
...
...
@@ -6,28 +6,28 @@ namespace Usage
{
Rg
.
Graph
processor_graph
=
new
CpuGraphSingle
();
child
=
createContent
(
processor_graph
,
label
);
relief
=
Gtk
.
ReliefStyle
.
NONE
;
style_button
()
;
}
public
GraphSwitcherButton
.
memory
(
string
label
)
{
Rg
.
Graph
memory_graph
=
new
MemoryGraph
();
child
=
createContent
(
memory_graph
,
label
);
relief
=
Gtk
.
ReliefStyle
.
NONE
;
style_button
()
;
}
public
GraphSwitcherButton
.
disk
(
string
label
)
{
Rg
.
Graph
disk_graph
=
new
CpuGraphSingle
();
child
=
createContent
(
disk_graph
,
label
);
relief
=
Gtk
.
ReliefStyle
.
NONE
;
style_button
()
;
}
public
GraphSwitcherButton
.
network
(
string
label
)
{
Rg
.
Graph
network_graph
=
new
CpuGraphSingle
();
child
=
createContent
(
network_graph
,
label
);
relief
=
Gtk
.
ReliefStyle
.
NONE
;
style_button
()
;
}
private
Gtk
.
Box
createContent
(
Rg
.
Graph
graph
,
string
label_text
)
...
...
@@ -49,5 +49,12 @@ namespace Usage
return
box
;
}
private
void
style_button
()
{
relief
=
Gtk
.
ReliefStyle
.
NONE
;
get_style_context
().
add_class
(
"sidebar"
);
set_can_focus
(
false
);
}
}
}
src/performance-view.vala
View file @
fec83649
...
...
@@ -26,6 +26,7 @@ namespace Usage
var
stackSwitcher
=
new
GraphStackSwitcher
(
performance_stack
,
sub_views
);
stackSwitcher
.
set_size_request
(
200
,
-
1
);
stackSwitcher
.
get_style_context
().
add_class
(
"sidebar"
);
var
paned
=
new
Gtk
.
Paned
(
Gtk
.
Orientation
.
HORIZONTAL
);
paned
.
add1
(
stackSwitcher
);
...
...
src/settings.vala
View file @
fec83649
...
...
@@ -4,8 +4,8 @@ namespace Usage {
public
class
Settings
:
Object
{
public
uint
graph_timespan
{
get
;
set
;
default
=
6
0000
;}
public
uint
graph_max_samples
{
get
;
set
;
default
=
6
0
;
}
public
uint
graph_timespan
{
get
;
set
;
default
=
3
0000
;}
public
uint
graph_max_samples
{
get
;
set
;
default
=
3
0
;
}
public
uint
graph_update_interval
{
get
{
return
graph_timespan
/
(
graph_max_samples
-
1
);
}}
public
uint
list_update_interval
{
get
;
set
;
default
=
1000
;
}
}
...
...
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