Commit graph

8 commits

Author SHA1 Message Date
Michael James Gratton
e0b956b64d Minor GTK and HTML CSS tweaks. 2016-10-04 10:58:17 +11:00
Michael James Gratton
3d1b208327 Fix lack of padding around GMail blockquotes. 2016-10-04 10:58:17 +11:00
Michael James Gratton
5ea4b0a051 Prefix CSS classes in message HTML to avoid collisions with HTML messages.
* ui/conversation-web-view.css: Prefix the names of base Geary-internal
  elements with "geary_" to reduce the odds of them colliding with class
  names in HTML messages. Chase the name changes in classes that generate
  them.

* src/client/conversation-viewer/conversation-message.vala
  (ConversationMessage): Use constants for class names and
  WebKit.DOMElement::class_list to add/remove them.
2016-10-04 10:58:17 +11:00
Michael James Gratton
b5e7c27c58 Tidy up collapsible quote container style and behaviour.
* src/client/conversation-viewer/conversation-message.vala:
  (ConversationMessage::create_quote_container): Fix unwanted whitespace
  at the top of quote containers by removing newlines from the inner
  HTML used to construct them.
  (ConversationMessage::unset_controllable_quotes): Replace using
  absolute pxiel value for determining whether a quote should be unhidden
  with a percentage of the parent container.

* ui/conversation-web-view.css: Polish and simplify quote container CSS.
2016-10-04 10:58:17 +11:00
Michael James Gratton
18621a2f7f Remove some unused/uneeded message body CSS. 2016-10-04 10:58:17 +11:00
Michael James Gratton
7581f16320 Substantially rework email HTML sanitising and styling.
* src/client/conversation-viewer/conversation-message.vala
  (ConversationMessage::clean_html_markup): Ensure all displayed message
  bodies have at least a HTML element, so that the style in
  conversation-web-view.css has something to work on. Load application
  style when sanitising the HTML rather than when the web view has
  loaded.

* src/client/conversation-viewer/conversation-web-view.vala
  (ConversationWebView): Just set user style using WebKit.WebSettings,
  don't try to set application CSS, and remove all associated code.

* ui/conversation-web-view.css: Only trigger CSS 2.1 § 10.6.7 on the HTML
  element, so BODY can be styled as normal by email CSS.
2016-10-04 10:58:17 +11:00
Michael James Gratton
dcc5f42eea Tidy up conversation list style. 2016-10-04 10:58:17 +11:00
Michael James Gratton
3dcf3ce7d6 Convert ConversationWebView HML CSS file to a resource, remove theme dir.
* src/client/application/geary-application.vala
  (GearyApplication::read_theme_file): Renamed to ::read_resource, do the
  lookup on a GResource instead of from the file system.
  (GearyApplication::get_ui_file): Remove unused method.

* src/client/conversation-viewer/conversation-web-view.vala
  (ConversationWebView): Chase CSS file rename and load method.

* theming/CMakeLists.txt: Removed, no longer needed.

* theming/message-viewer.css: Moved to ui/conversation-web-view.css.

* ui/CMakeLists.txt: Add conversation-web-view.css resource.

* CMakeLists.txt: Remove theming include.

* src/client/application/geary-application.vala :
2016-10-04 10:58:17 +11:00
Renamed from theming/message-viewer.css (Browse further)