Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gajim
gajim-plugins
Commits
f583de57
Commit
f583de57
authored
Feb 09, 2018
by
Daniel Brötzmann
Committed by
Philipp Hörist
Feb 14, 2018
Browse files
[preview] Add margins and drop-shadow
parent
7bc48451
Changes
1
Hide whitespace changes
Inline
Side-by-side
url_image_preview/url_image_preview.py
View file @
f583de57
...
...
@@ -30,6 +30,7 @@ from gajim.common import app
from
gajim.common
import
helpers
from
gajim.common
import
configpaths
from
gajim
import
dialogs
from
gajim
import
gtkgui_helpers
from
gajim.plugins
import
GajimPlugin
from
gajim.plugins.helpers
import
log_calls
from
url_image_preview.http_functions
import
get_http_head
,
get_http_file
...
...
@@ -368,6 +369,13 @@ class Base(object):
image
=
Gtk
.
Image
.
new_from_animation
(
pixbuf
)
else
:
image
=
Gtk
.
Image
.
new_from_pixbuf
(
pixbuf
)
css
=
'''#Preview {
box-shadow: 0px 0px 3px 0px alpha(@theme_text_color, 0.2);
margin: 5px 10px 5px 10px; }'''
gtkgui_helpers
.
add_css_to_widget
(
image
,
css
)
image
.
set_name
(
'Preview'
)
event_box
.
set_tooltip_text
(
url
)
event_box
.
add
(
image
)
event_box
.
show_all
()
...
...
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