Commit fec83649 authored by Petr Štětka's avatar Petr Štětka
Browse files

Styling sidebar.

parent 2fdc793c
......@@ -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.svg">
<img src="https://raw.githubusercontent.com/gnome-design-team/gnome-mockups/master/usage/usage-wires.png">
No preview for this file type
......@@ -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

82.9 KB | W: | H:

screenshot.png

94.5 KB | W: | H:

screenshot.png
screenshot.png
screenshot.png
screenshot.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -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);
}
}
}
......@@ -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);
......
......@@ -4,8 +4,8 @@ namespace Usage {
public class Settings : Object{
public uint graph_timespan { get; set; default = 60000;}
public uint graph_max_samples { get; set; default = 60; }
public uint graph_timespan { get; set; default = 30000;}
public uint graph_max_samples { get; set; default = 30; }
public uint graph_update_interval { get { return graph_timespan / (graph_max_samples - 1); }}
public uint list_update_interval { get; set; default = 1000; }
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment