Skip to content
This repository has been archived by the owner on Jun 4, 2022. It is now read-only.

Commit

Permalink
Bandage blurry fonts on plus.google.com.
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Cochrane committed Jan 3, 2018
1 parent 6eb8ac3 commit a56faae
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Services/Prosody/expression.vala
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file is part of Odysseus Web Browser (Copyright Adrian Cochrane 2017).
* This file is part of Odysseus Web Browser (Copyright Adrian Cochrane 2017-2018).
*
* Odysseus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion src/Services/Prosody/i18n.vala
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file is part of Odysseus Web Browser (Copyright Adrian Cochrane 2017).
* This file is part of Odysseus Web Browser (Copyright Adrian Cochrane 2017-2018).
*
* Odysseus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
30 changes: 30 additions & 0 deletions src/Traits/decorate/fix-plus.google.com.vala
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/**
* This file is part of Odysseus Web Browser (Copyright Adrian Cochrane 2018).
*
* Odysseus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Odysseus is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with Odysseus. If not, see <http://www.gnu.org/licenses/>.
*/
/* Fix for the blurriness of Google Plus's fonts.
Not really something I want to build into Odysseus as I'd rather focus it should
focus on making the whole web better, not just specific sites. Besides
this only covers the symptoms, and not the real issue. */
namespace Odysseus.Traits {
public void fix_google_plus(WebKit.WebView web) {
var css = new WebKit.UserStyleSheet("* {font-family: sans-serif;}",
WebKit.UserContentInjectedFrames.TOP_FRAME,
WebKit.UserStyleLevel.USER,
new string[] {"https://plus.google.com/*"}, new string[0]);
web.user_content_manager.add_style_sheet(css);
}
}
1 change: 1 addition & 0 deletions src/Traits/init.vala
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ namespace Odysseus.Traits {
setup_persist_tab_history(tab);
setup_internal_favicons(tab);
setup_autoscroll(tab.web);
fix_google_plus(tab.web);
}

public void setup_autosuggest() {
Expand Down
3 changes: 2 additions & 1 deletion src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ overlay_widgets = ['FindToolbar', 'InfoContainer']
traits = ['init', 'download-progress', 'download-window']
nav_traits = ['viewsource', 'errors', 'autodownload', 'persist-tab-history',
'newtab']
decor_traits = ['alert', 'permit', 'settings', 'internal-favicons', 'AutoScroll']
decor_traits = ['alert', 'permit', 'settings', 'internal-favicons', 'AutoScroll',
'fix-plus.google.com']
complete_traits = ['imply-http', 'duckduckgo', 'ddg-autocomplete']
services = ['pages', 'Completer', 'globals', 'icons']
db_services = ['database', 'util']
Expand Down

0 comments on commit a56faae

Please sign in to comment.