8
8
public class AppsInfo : Box {
9
9
private Separator separator;
10
10
private RoundBox box;
11
public RoundBox reviews_box;
11
12
private Label pkg_name;
12
13
private Label short_description;
13
14
private Label description;
60
61
label_box.pack_start(pkg_name, false, false, 0);
61
62
label_box.pack_start(short_description, false, false, 0);
63
summary_box.pack_start(label_box, true, true, 0);
64
Button install_button = new Button.with_label("Install");
65
install_button.relief = ReliefStyle.NONE;
66
summary_box.pack_start(install_button, false, false, 0);
64
summary_box.pack_start(label_box, false, false, 0);
67
Box status_box = new Box(Orientation.HORIZONTAL, 0);
69
Label status_label = new Label("<i>Installed</i>");
70
status_label.margin_right = 2;
71
status_label.use_markup = true;
73
status_box.pack_start(new Image.from_stock(Stock.YES, IconSize.MENU), false, false, 0);
74
status_box.pack_start(status_label, false, false, 0);
76
summary_box.pack_end(status_box, false, false, 0);
69
79
Box description_box = new Box(Orientation.VERTICAL, 0);
77
87
// Details (version and size)
78
88
Box details_box = new Box(Orientation.VERTICAL, 0);
79
details_box.border_width = 10;
80
version = new Label("<b>Version:</b>");
89
details_box.border_width = 5;
90
version = new Label("<b>Version:</b> 0.0.1");
81
91
version.use_markup = true;
82
92
version.halign = Align.START;
83
size = new Label("<b>Size:</b>");
93
size = new Label("<b>Size:</b> 1024 Kb");
84
94
size.use_markup = true;
85
95
size.halign = Align.START;
86
id = new Label("<b>Id:</b>");
96
id = new Label("<b>Id:</b> package-id");
87
97
id.use_markup = true;
88
98
id.halign = Align.START;
89
99
details_box.pack_start(id, false, false, 0);
98
108
box.pack_start(details_box, false, false, 0);
111
reviews_box = new RoundBox(Orientation.VERTICAL, 0);
112
reviews_box.expand = false;
114
Box container = new Box(Orientation.HORIZONTAL, 3);
115
container.border_width = 5;
117
Label reviews_label = new Label("<big><b>Reviews</b></big>");
118
reviews_label.use_markup = true;
119
reviews_label.halign = Align.START;
121
container.pack_start(new Image.from_stock(Stock.HELP, IconSize.DIALOG), false, false, 0);
122
container.pack_start(reviews_label, false, false, 0);
124
reviews_box.pack_start(container, false, false, 0);
100
126
pack_start(box, true, true, 0);
127
pack_start(reviews_box, false, false, 0);
130
ButtonBox b_container = new ButtonBox(Orientation.HORIZONTAL);
131
b_container.layout_style = ButtonBoxStyle.END;
132
b_container.homogeneous = false;
134
Button bt = new Button.with_label("Check for reviews");
136
b_container.pack_start(bt, false, false, 0);
137
b_container.pack_start(new Button.with_label("Install"), false, false, 0);
138
b_container.foreach((child) => {
139
b_container.set_child_non_homogeneous(child, true);
142
pack_start(b_container, false, false, 0);
b'\\ No newline at end of file'