[polari] ui: Move chat-log background to ChatView style
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] ui: Move chat-log background to ChatView style
- Date: Wed, 10 Sep 2014 15:33:48 +0000 (UTC)
commit 701e9ee7cfe7dff9c52aad02f90abbaa24bf957c
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Sep 10 16:04:53 2014 +0200
ui: Move chat-log background to ChatView style
The current code results in a gray border around the chat log with
newer Adwaita versions, and the ChatView "owns" the extra border
anyway, so it makes sense to move the style there ...
data/resources/application.css | 5 ++---
src/chatView.js | 1 +
src/roomStack.js | 19 +++++--------------
3 files changed, 8 insertions(+), 17 deletions(-)
---
diff --git a/data/resources/application.css b/data/resources/application.css
index eab3cb2..2c86123 100644
--- a/data/resources/application.css
+++ b/data/resources/application.css
@@ -76,12 +76,11 @@
background-color: mix(@theme_unfocused_selected_bg_color, @theme_unfocused_selected_fg_color, 0.1);
}
-.polari-chat-stack {
+.polari-chat-log {
background-color: @theme_base_color;
- border-width: 0;
}
-.polari-chat-stack:backdrop {
+.polari-chat-log:backdrop {
background-color: @theme_unfocused_base_color;
}
diff --git a/src/chatView.js b/src/chatView.js
index 6fa3015..66e26af 100644
--- a/src/chatView.js
+++ b/src/chatView.js
@@ -226,6 +226,7 @@ const ChatView = new Lang.Class({
visible: true,
wrap_mode: Gtk.WrapMode.WORD_CHAR,
border_width: 6 });
+ this._view.get_style_context().add_class('polari-chat-log');
this.widget.add(this._view);
this.widget.show_all();
diff --git a/src/roomStack.js b/src/roomStack.js
index 2f006df..78dcbe2 100644
--- a/src/roomStack.js
+++ b/src/roomStack.js
@@ -12,7 +12,8 @@ const RoomStack = new Lang.Class({
_init: function(inputSizeGroup) {
this._inputSizeGroup = inputSizeGroup;
- this._createWidget();
+ this.widget = new Gtk.Stack();
+ this.widget.show_all();
this._roomManager = ChatroomManager.getDefault();
@@ -39,7 +40,7 @@ const RoomStack = new Lang.Class({
this._rooms[id] = view;
this._inputSizeGroup.add_widget(view.inputWidget);
- this._stack.add_named(view.widget, id);
+ this.widget.add_named(view.widget, id);
},
_roomAdded: function(roomManager, room) {
@@ -52,8 +53,8 @@ const RoomStack = new Lang.Class({
},
_activeRoomChanged: function(manager, room) {
- this._stack.set_visible_child_name(room ? room.id : 'placeholder');
- this._stack.transition_type = room ? Gtk.StackTransitionType.CROSSFADE
+ this.widget.set_visible_child_name(room ? room.id : 'placeholder');
+ this.widget.transition_type = room ? Gtk.StackTransitionType.CROSSFADE
: Gtk.StackTransitionType.NONE;
},
@@ -63,16 +64,6 @@ const RoomStack = new Lang.Class({
let sensitive = room && room.channel &&
!this._selectionModeAction.state.get_boolean();
this._rooms[id].inputSensitive = sensitive;
- },
-
- _createWidget: function() {
- this.widget = new Gtk.Frame();
- this.widget.get_style_context().add_class('polari-chat-stack');
-
- this._stack = new Gtk.Stack();
- this.widget.add(this._stack);
-
- this.widget.show_all();
}
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]