Remove Card class and rename CardArea<T> to ListView<T>
This commit is contained in:
parent
b2f5288c4b
commit
5697cf0652
@ -1,5 +1,5 @@
|
||||
namespace StudySystemClient {
|
||||
public class ActivitiesView : CardArea<ActivityCard>, IRefreshable {
|
||||
public class ActivitiesView : ListView<ActivityCard>, IRefreshable {
|
||||
private const uint REFRESH_PERIOD_MS = 30000;
|
||||
|
||||
private Client client;
|
||||
@ -7,6 +7,8 @@ namespace StudySystemClient {
|
||||
private bool pending_sort;
|
||||
|
||||
public ActivitiesView(Client client) {
|
||||
base();
|
||||
add_css_class("card-container");
|
||||
this.client = client;
|
||||
refresher = new Refresher(this, REFRESH_PERIOD_MS);
|
||||
pending_sort = false;
|
||||
|
@ -1,5 +1,5 @@
|
||||
namespace StudySystemClient {
|
||||
public class ActivityCard : Card {
|
||||
public class ActivityCard : Gtk.Frame {
|
||||
public signal void session_logged(string subject, ActivityType type,
|
||||
int minutes);
|
||||
public signal void log_closed();
|
||||
@ -10,7 +10,8 @@ namespace StudySystemClient {
|
||||
private Gtk.Label priority_label;
|
||||
|
||||
public ActivityCard(Activity activity) {
|
||||
base();
|
||||
hexpand = true;
|
||||
add_css_class("card");
|
||||
|
||||
this.activity = activity;
|
||||
logging = false;
|
||||
|
@ -1,15 +1,8 @@
|
||||
namespace StudySystemClient {
|
||||
public class Card : Gtk.Frame {
|
||||
public Card() {
|
||||
hexpand = true;
|
||||
add_css_class("card");
|
||||
}
|
||||
}
|
||||
|
||||
public class CardArea<T> : Gtk.Box {
|
||||
public class ListView<T> : Gtk.Box {
|
||||
protected IterableBox<T> container;
|
||||
|
||||
public CardArea() {
|
||||
public ListView() {
|
||||
hexpand = vexpand = true;
|
||||
margin_top = margin_bottom = margin_start = margin_end = 0;
|
||||
|
||||
@ -19,7 +12,6 @@ namespace StudySystemClient {
|
||||
var scrolled_window = new Gtk.ScrolledWindow();
|
||||
scrolled_window.hscrollbar_policy = Gtk.PolicyType.NEVER;
|
||||
scrolled_window.hexpand = scrolled_window.vexpand = true;
|
||||
scrolled_window.add_css_class("card-container");
|
||||
scrolled_window.set_child(container);
|
||||
|
||||
append(scrolled_window);
|
@ -13,11 +13,11 @@ lib = library(
|
||||
'activities_view.vala',
|
||||
'activity.vala',
|
||||
'activity_card.vala',
|
||||
'card.vala',
|
||||
'client.vala',
|
||||
'connection.vala',
|
||||
'der.vala',
|
||||
'iterable_box.vala',
|
||||
'list_view.vala',
|
||||
'main_window.vala',
|
||||
'periodic.vala',
|
||||
'refresher.vala',
|
||||
|
Loading…
x
Reference in New Issue
Block a user