Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
gajim
gajim
Commits
fadc7596
Commit
fadc7596
authored
Mar 25, 2021
by
Daniel Brötzmann
Committed by
Daniel Brötzmann
Mar 25, 2021
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MessageInputTextView: Add focus borders
parent
d7732dfa
Pipeline
#7537
passed with stages
in 7 minutes and 27 seconds
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
0 deletions
+22
-0
gajim/chat_control_base.py
gajim/chat_control_base.py
+2
-0
gajim/data/style/gajim.css
gajim/data/style/gajim.css
+8
-0
gajim/gtk/message_input.py
gajim/gtk/message_input.py
+12
-0
No files found.
gajim/chat_control_base.py
View file @
fadc7596
...
...
@@ -217,6 +217,8 @@ def __init__(self, parent_win, widget_name, contact, acct,
'set_visible'
)
self
.
msg_scrolledwindow
=
ScrolledWindow
()
self
.
msg_scrolledwindow
.
get_style_context
().
add_class
(
'message-input-border'
)
self
.
msg_scrolledwindow
.
add
(
self
.
msg_textview
)
self
.
xml
.
hbox
.
pack_start
(
self
.
msg_scrolledwindow
,
True
,
True
,
0
)
...
...
gajim/data/style/gajim.css
View file @
fadc7596
...
...
@@ -30,6 +30,14 @@
.chatcontrol-separator
{
margin-bottom
:
5px
;}
.message-input-border
{
border
:
2px
solid
transparent
;
}
.message-input-focus
{
border
:
2px
solid
@
theme_selected_bg_color
;
border-radius
:
4px
;
}
.link-button
{
min-height
:
0px
;
}
/* VCardWindow */
...
...
gajim/gtk/message_input.py
View file @
fadc7596
...
...
@@ -92,6 +92,8 @@ def __init__(self):
self
.
end_tags
[
'strike'
]
=
'</span>'
self
.
connect_after
(
'paste-clipboard'
,
self
.
_after_paste_clipboard
)
self
.
connect
(
'focus-in-event'
,
self
.
_on_focus_in
)
self
.
connect
(
'focus-out-event'
,
self
.
_on_focus_out
)
self
.
connect
(
'destroy'
,
self
.
_on_destroy
)
def
_on_destroy
(
self
,
*
args
):
...
...
@@ -105,6 +107,16 @@ def _on_destroy(self, *args):
None
,
Gdk
.
DragAction
.
DEFAULT
)
def
_on_focus_in
(
self
,
_widget
,
_event
):
scrolled
=
self
.
get_parent
()
scrolled
.
get_style_context
().
add_class
(
'message-input-focus'
)
return
False
def
_on_focus_out
(
self
,
_widget
,
_event
):
scrolled
=
self
.
get_parent
()
scrolled
.
get_style_context
().
remove_class
(
'message-input-focus'
)
return
False
def
insert_text
(
self
,
text
):
self
.
get_buffer
().
insert_at_cursor
(
text
)
...
...
Daniel Brötzmann
@wurstsalat
mentioned in issue
#10498 (closed)
·
Mar 25, 2021
mentioned in issue
#10498 (closed)
mentioned in issue #10498
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment