ladybird/SharedGraphics/TextAlignment.h
Andreas Kling 7dc4078a73 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.
2019-04-24 23:46:19 +02:00

14 lines
275 B
C

#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;
}
}