-
Notifications
You must be signed in to change notification settings - Fork 68
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 #1135 from chaosphere2112/text_rot_workaround
Workaround for #1093
- Loading branch information
Showing
3 changed files
with
20 additions
and
50 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import vcs | ||
|
||
class FontEditor(object): | ||
def __init__(self, toolbar, font_setter, current_font="default"): | ||
|
||
self.toolbar = toolbar | ||
self.set_font = font_setter | ||
|
||
self.fonts = sorted(vcs.elements["font"].keys()) | ||
|
||
self.font_button = self.toolbar.add_button(self.fonts, action=self.font_state) | ||
self.font_button.set_state(self.fonts.index(current_font)) | ||
|
||
def font_state(self, state): | ||
font = self.fonts[state] | ||
self.set_font(font) |
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