[polari] chatView: Change color of status header on hover
- From: Kunal Jain <kunaljain src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] chatView: Change color of status header on hover
- Date: Wed, 23 Dec 2015 15:14:49 +0000 (UTC)
commit 3064de44023cf526f4db0811cb6e07cb77a0b73d
Author: Kunaal Jain <kunaalus gmail com>
Date: Wed Dec 23 02:30:47 2015 +0530
chatView: Change color of status header on hover
Highlight the compressed status messages on hover
by changing the color. The change helps indicating,
that on hover the status message is clickable.
https://bugzilla.gnome.org/show_bug.cgi?id=759032
src/chatView.js | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/chatView.js b/src/chatView.js
index 77e3dcc..6cbf99a 100644
--- a/src/chatView.js
+++ b/src/chatView.js
@@ -342,6 +342,12 @@ const ChatView = new Lang.Class({
if (this._activeNickColor.equal(this._inactiveNickColor))
this._inactiveNickColor.alpha = 0.5;
+ context.save();
+ context.add_class('view');
+ context.set_state(Gtk.StateFlags.NORMAL);
+ this._statusHeaderHoverColor = context.get_color(context.get_state());
+ context.restore();
+
let buffer = this._view.get_buffer();
let tagTable = buffer.get_tag_table();
let tags = [
@@ -868,6 +874,11 @@ const ChatView = new Lang.Class({
groupTag.invisible = !groupTag.invisible;
});
+ headerTag.connect('notify::hover', Lang.bind(this,
+ function() {
+ headerTag.foreground_rgba = headerTag.hover ? this._statusHeaderHoverColor : null;
+ }));
+
this._ensureNewLine();
headerMark = buffer.create_mark('idle-status-start', buffer.get_end_iter(), true);
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]