-
Notifications
You must be signed in to change notification settings - Fork 568
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support text alignment in single-line TextBox
This is a pragmatic patch that allows the user to control how text is aligned within a single-line textbox when the textbox itself is larger than the contained text. This is directly motivated by Runebender; there are a number of places where we would like to have a textbox where the *text* is centered or right-aligned, and this is not currently possible. This is a bit hacky: in particular, we are not BiDi aware (even in the current textbox) which means that TextAlignment::Start is always left, and TextAlignment::End is always right. (Center is fine, and Justified is meaningless for a single line.) One complication encountered here is where to draw the cursor when there is no data; our options are either to draw the cursor at the start of the placeholder, or to draw it in the correct position for the alignment; we choose the latter, which feels less disruptive.
- Loading branch information
Showing
3 changed files
with
105 additions
and
23 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