mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 20:07:36 +00:00
SharedGraphics: Add is_right_text_alignment(TextAlignment) helper.
This seems a tad bit more future-proof than manually checking all the valid right-side TextAlignment values in clients.
This commit is contained in:
parent
0c88ce9ee3
commit
7dc4078a73
1 changed files with 10 additions and 0 deletions
|
@ -1,3 +1,13 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
enum class TextAlignment { TopLeft, CenterLeft, Center, CenterRight };
|
enum class TextAlignment { TopLeft, CenterLeft, Center, CenterRight };
|
||||||
|
|
||||||
|
inline bool is_right_text_alignment(TextAlignment alignment)
|
||||||
|
{
|
||||||
|
switch (alignment) {
|
||||||
|
case TextAlignment::CenterRight:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue