summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Chimento <philip@endlessm.com>2013-08-07 17:38:59 -0700
committerPhilip Chimento <philip@endlessm.com>2013-08-07 17:55:47 -0700
commit1bd3a6f7dddc0b5146067f65d2d3d9c95b26fa23 (patch)
treedc9c7d71684f0b4515234981a8bc6b765bd20fe8
parentc6875cc9b66a5cb0389202a0f1eccfd175c82b9a (diff)
Add scrollbar to category description
And set its styles (no specs available)! Add right margin to the text view so that the scrollbar is not right up against the text. [endlessm/eos-sdk#249]
-rw-r--r--data/css/eos-wikipedia-domain.css5
-rw-r--r--wikipedia/PrebuiltCategoryPage.js8
2 files changed, 11 insertions, 2 deletions
diff --git a/data/css/eos-wikipedia-domain.css b/data/css/eos-wikipedia-domain.css
index 1007532..60cba6b 100644
--- a/data/css/eos-wikipedia-domain.css
+++ b/data/css/eos-wikipedia-domain.css
@@ -63,6 +63,11 @@ Gjs_ArticleList .scrollbar.slider {
font-family: "Source Sans Pro";
}
+#category_scrolled_window .scrollbar.slider {
+ border-radius: 6px;
+ background-color: alpha(white, 0.3);
+}
+
#category_title{
/* Top padding is hack because we have bad version of BentonSans */
padding-top: 20px;
diff --git a/wikipedia/PrebuiltCategoryPage.js b/wikipedia/PrebuiltCategoryPage.js
index 7222443..5ee3e23 100644
--- a/wikipedia/PrebuiltCategoryPage.js
+++ b/wikipedia/PrebuiltCategoryPage.js
@@ -98,19 +98,23 @@ const PrebuiltCategoryPage = new Lang.Class({
this._description_text_view.set_pixels_inside_wrap(10);
this._description_text_view.set_wrap_mode(Gtk.WrapMode.WORD);
+ this._description_text_view.right_margin = 20;
this._description_scrolled_window = new Gtk.ScrolledWindow({
+ name: 'category_scrolled_window',
halign: Gtk.Align.FILL
});
this._description_scrolled_window.add(this._description_text_view);
- this._description_scrolled_window.set_policy(Gtk.PolicyType.ALWAYS, Gtk.PolicyType.ALWAYS);
+ this._description_scrolled_window.set_policy(Gtk.PolicyType.NEVER,
+ Gtk.PolicyType.AUTOMATIC);
this._inner_grid = new Gtk.Grid({
orientation: Gtk.Orientation.VERTICAL,
expand: true,
margin_left: 45,
- margin_right: 45
+ margin_right: 45,
+ margin_bottom: 15
});
this.parent(props);