-
-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2091 from 9123086/JF-fallbackfont-title
fallbackfont for content title display
- Loading branch information
Showing
11 changed files
with
99 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
sub init() | ||
m.top.id = "jflabel" | ||
m.top.observeField("text", "onText") | ||
setFallbackfont() | ||
end sub | ||
|
||
sub onText() | ||
setFallbackfont() | ||
end sub | ||
|
||
sub setFallbackfont() | ||
if m.global.fallbackFont = invalid or m.top.font.id = "jffallbackfont" then return | ||
fontSize = m.top.font.size | ||
|
||
fallbackFontSize = m.top.fallbackFontSize | ||
if getInterface(fallbackFontSize, "ifInteger") <> invalid and fallbackFontSize > 1 then fontSize = fallbackFontSize | ||
|
||
m.top.font = m.global.fallbackFont.clone(true) | ||
m.top.font.size = fontSize | ||
end sub | ||
|
||
sub onFallbackFontSize() | ||
if m.top.font.size <> m.top.fallbackFontSize then m.top.font.size = m.top.fallbackFontSize | ||
end sub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<component name="jflabel" extends="label"> | ||
<interface> | ||
<field id="fallbackFontSize" type="integer" onChange="onFallbackFontSize"/> | ||
</interface> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
sub init() | ||
m.top.id = "jfscrollinglabel" | ||
m.top.observeField("text", "onText") | ||
setFallbackfont() | ||
end sub | ||
|
||
sub onText() | ||
setFallbackfont() | ||
end sub | ||
|
||
sub setFallbackfont() | ||
if m.global.fallbackFont = invalid or m.top.font.id = "jffallbackfont" then return | ||
fontSize = m.top.font.size | ||
|
||
fallbackFontSize = m.top.fallbackFontSize | ||
if getInterface(fallbackFontSize, "ifInteger") <> invalid and fallbackFontSize > 1 then fontSize = fallbackFontSize | ||
|
||
m.top.font = m.global.fallbackFont.clone(true) | ||
m.top.font.size = fontSize | ||
end sub | ||
|
||
sub onFallbackFontSize() | ||
if m.top.font.size <> m.top.fallbackFontSize then m.top.font.size = m.top.fallbackFontSize | ||
end sub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<component name="jfscrollinglabel" extends="scrollinglabel"> | ||
<interface> | ||
<field id="fallbackFontSize" type="integer" onChange="onFallbackFontSize" /> | ||
</interface> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters