summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorP. F. Chimento <philip.chimento@gmail.com>2013-07-31 14:56:25 -0700
committerP. F. Chimento <philip.chimento@gmail.com>2013-07-31 14:56:25 -0700
commitc2cf58bae51dde0ae428d273c70038e9ea248323 (patch)
tree8360edbafe0f72201774bafecaebfa6212351345
parent832f516fa6d1681710d11f51040dabb4e19012bf (diff)
parentee401b5ccdaf99e6b8502009656478beef7922c2 (diff)
Merge pull request #201 from endlessm/issues/195
#195 Increase category description spacing, use TextView instead of Label
-rw-r--r--wikipedia/data/css/endless_brazil.css3
-rw-r--r--wikipedia/src/endless_wikipedia/PrebuiltCategoryPage.js27
2 files changed, 19 insertions, 11 deletions
diff --git a/wikipedia/data/css/endless_brazil.css b/wikipedia/data/css/endless_brazil.css
index fc667cb..f8dabb3 100644
--- a/wikipedia/data/css/endless_brazil.css
+++ b/wikipedia/data/css/endless_brazil.css
@@ -47,7 +47,8 @@ Gjs_ArticleList .button:active {
#category_description{
color:rgba(255, 255, 255, 1.0);
- font-size: 16px;
+ background-color: rgba(0, 0, 0, 0);
+ font-size: 12px;
}
#category_title{
diff --git a/wikipedia/src/endless_wikipedia/PrebuiltCategoryPage.js b/wikipedia/src/endless_wikipedia/PrebuiltCategoryPage.js
index 754c038..4c4ac77 100644
--- a/wikipedia/src/endless_wikipedia/PrebuiltCategoryPage.js
+++ b/wikipedia/src/endless_wikipedia/PrebuiltCategoryPage.js
@@ -85,21 +85,28 @@ const PrebuiltCategoryPage = new Lang.Class({
constraint: Gtk.Orientation.HORIZONTAL
});
- this._description_label = new Gtk.Label({
+ this._description_text_view = new Gtk.TextView({
name:"category_description",
- valign: Gtk.Align.START,
- halign: Gtk.Align.START,
- margin_left:45,
- margin_right:45
+ sensitive: false,
+ editable: false,
+ cursor_visible: false
});
- this._description_label.set_line_wrap(true);
- this._description_label.set_max_width_chars(40);
+
+ this._description_text_view.set_pixels_inside_wrap(10);
+ this._description_text_view.set_wrap_mode(Gtk.WrapMode.WORD);
+
+ this._description_scrolled_window = new Gtk.ScrolledWindow({
+ margin_left: 45,
+ margin_right: 45
+ });
+
+ this._description_scrolled_window.add(this._description_text_view);
this.parent(props);
this._vbox.pack_start(this._title_label, false, false, 0);
this._vbox.pack_start(this._description_separator, false, false, 0);
- this._vbox.pack_start(this._description_label, true, true, 0);
+ this._vbox.pack_start(this._description_scrolled_window, true, true, 0);
this._layout_grid.add(this._splash_separator);
this._layout_grid.add(this._vbox);
@@ -130,8 +137,8 @@ const PrebuiltCategoryPage = new Lang.Class({
set description(value) {
this._description = value;
- if(this._description_label)
- this._description_label.label = value;
+ if(this._description_text_view)
+ this._description_text_view.buffer.set_text(value, -1);
},
get image_uri(){