mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-06 02:55:49 +03: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
Notes:
sideshowbarker
2024-07-19 14:36:05 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/7dc4078a73b
@ -1,3 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
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…
Reference in New Issue
Block a user