Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix line height for chat input box #351

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ private String getCssForDarkTheme() {
// Card
themeMap.put(QChatCssVariable.CardBackground, cardBackgroundColor);

themeMap.put(QChatCssVariable.LineHeight, "1.25em");

return getCss(themeMap);
}

Expand Down Expand Up @@ -150,6 +152,8 @@ private String getCssForLightTheme() {
// Card
themeMap.put(QChatCssVariable.CardBackground, cardBackgroundColor);

themeMap.put(QChatCssVariable.LineHeight, "1.25em");

return getCss(themeMap);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ public enum QChatCssVariable {
AlternateForeground("--mynah-color-alternate-reverse"),

// Card
CardBackground("--mynah-card-bg");
CardBackground("--mynah-card-bg"),

// Line height
LineHeight("--mynah-line-height");

private String value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class QChatCssVariableTest {

@Test
void testEnumValues() {
assertEquals(27, QChatCssVariable.values().length);
assertEquals(28, QChatCssVariable.values().length);
}

@Test
Expand Down Expand Up @@ -72,6 +72,11 @@ void testCardValues() {
assertEquals("--mynah-card-bg", QChatCssVariable.CardBackground.getValue());
}

@Test
void testLineHeighValues() {
assertEquals("--mynah-line-height", QChatCssVariable.LineHeight.getValue());
}

@Test
void testInvalidEnum() {
assertThrows(IllegalArgumentException.class, () -> QChatCssVariable.valueOf("NonExistentVariable"));
Expand Down
Loading