Skip to content

Commit

Permalink
Use font pt provided by user without scaling (unless fullscreen)
Browse files Browse the repository at this point in the history
  • Loading branch information
kmwallio committed Oct 18, 2020
1 parent 832df7b commit f1d4e64
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion data/com.github.kmwallio.thiefmd.gschema.xml
Expand Up @@ -171,7 +171,7 @@
<description>Font Family for editor to use</description>
</key>
<key name="font-size" type="i">
<default>12</default>
<default>14</default>
<summary>Font Size to use</summary>
<description>Font Size for editor to use</description>
</key>
Expand Down
6 changes: 3 additions & 3 deletions src/Constants/ThiefProperties.vala
Expand Up @@ -97,17 +97,17 @@ The `markdown` editor worth stealing. *Focus* more on **writing**.
.small-text {
%s;
font-size: %0.2frem;
font-size: %dpt;
}
.focus-text {
%s;
font-size: %0.2frem;
font-size: %dpt;
}
.full-text {
%s;
font-size: %0.2frem;
font-size: %dpt;
}""";

public const string DYNAMIC_CSS = """@define-color colorPrimary %s;
Expand Down
6 changes: 3 additions & 3 deletions src/Controllers/UI.vala
Expand Up @@ -210,9 +210,9 @@ namespace ThiefMD.Controllers.UI {

// Assuming 12pt is 1rem, scale to original CSS based on that
string new_font = ThiefProperties.FONT_SETTINGS.printf (
settings.get_css_font_family (), ((settings.get_css_font_size () / Constants.SIZE_1_REM_IN_PT) * 1.25),
settings.get_css_font_family (), ((settings.get_css_font_size () / Constants.SIZE_1_REM_IN_PT) * 1.35),
settings.get_css_font_family (), ((settings.get_css_font_size () / Constants.SIZE_1_REM_IN_PT) * 1.45)
settings.get_css_font_family (), (int)((settings.get_css_font_size ()) * 1),
settings.get_css_font_family (), (int)((settings.get_css_font_size ()) * 1.2),
settings.get_css_font_family (), (int)((settings.get_css_font_size ()) * 1.4)
);

try {
Expand Down

0 comments on commit f1d4e64

Please sign in to comment.