Wavelength
Privacy-focused, cross-platform, and open-source communication application
Loading...
Searching...
No Matches
ChatStyle Class Reference

Provides static methods to retrieve CSS stylesheets for various chat UI elements. More...

#include <chat_style.h>

Collaboration diagram for ChatStyle:

Static Public Member Functions

static QString GetAttachButtonStyle ()
 Gets the stylesheet for the "Attach File" button (QPushButton). Defines background, text color, border, padding, and icon for the attach button, including styles for hover and pressed states.
 
static QString GetChatStyleSheet ()
 Gets the base stylesheet for the main chat view container and header. Defines background, text color, font, and borders for the overall chat area.
 
static QString GetInputFieldStyle ()
 Gets the stylesheet for the chat message input field (QLineEdit). Defines background, text color, border, padding, and font for the input field, including styles for the focused state.
 
static QString GetReceivedMessageStyle ()
 Gets the stylesheet for message bubbles received from other users. Defines background, border, padding, margin, color, and font for received messages. Typically aligned to the opposite side of sent messages with a different color scheme.
 
static QString GetScrollBarStyle ()
 Gets the stylesheet for the vertical scrollbar used in the chat view. Defines the appearance of the scrollbar track, handle, and buttons (though buttons are hidden).
 
static QString GetSendButtonStyle ()
 Gets the stylesheet for the "Send" message button (QPushButton). Defines background, text color, border, padding, and font for the send button, including styles for hover and pressed states.
 
static QString GetSentMessageStyle ()
 Gets the stylesheet for message bubbles sent by the current user. Defines background, border, padding, margin, color, and font for sent messages. Typically aligned to one side (e.g., left) with a specific color scheme.
 
static QString GetSystemMessageStyle ()
 Gets the stylesheet for system messages (e.g., user joined/left, errors). Defines background, border, padding, margin, color, and font for system messages. Typically centered or distinctively styled to differentiate from user messages.
 

Detailed Description

Provides static methods to retrieve CSS stylesheets for various chat UI elements.

This class centralizes the generation of Qt Style Sheets (CSS) used to style the chat view, message bubbles (sent, received, system), input fields, buttons, and scrollbars, ensuring a consistent cyberpunk theme based on CyberpunkStyle colors.

Member Function Documentation

◆ GetAttachButtonStyle()

QString ChatStyle::GetAttachButtonStyle ( )
static

Gets the stylesheet for the "Attach File" button (QPushButton). Defines background, text color, border, padding, and icon for the attach button, including styles for hover and pressed states.

Returns
A QString containing the CSS rules.
Here is the call graph for this function:

◆ GetChatStyleSheet()

QString ChatStyle::GetChatStyleSheet ( )
static

Gets the base stylesheet for the main chat view container and header. Defines background, text color, font, and borders for the overall chat area.

Returns
A QString containing the CSS rules.
Here is the call graph for this function:

◆ GetInputFieldStyle()

QString ChatStyle::GetInputFieldStyle ( )
static

Gets the stylesheet for the chat message input field (QLineEdit). Defines background, text color, border, padding, and font for the input field, including styles for the focused state.

Returns
A QString containing the CSS rules.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetReceivedMessageStyle()

QString ChatStyle::GetReceivedMessageStyle ( )
static

Gets the stylesheet for message bubbles received from other users. Defines background, border, padding, margin, color, and font for received messages. Typically aligned to the opposite side of sent messages with a different color scheme.

Returns
A QString containing the CSS rules.
Here is the call graph for this function:

◆ GetScrollBarStyle()

QString ChatStyle::GetScrollBarStyle ( )
static

Gets the stylesheet for the vertical scrollbar used in the chat view. Defines the appearance of the scrollbar track, handle, and buttons (though buttons are hidden).

Returns
A QString containing the CSS rules.
Here is the caller graph for this function:

◆ GetSendButtonStyle()

QString ChatStyle::GetSendButtonStyle ( )
static

Gets the stylesheet for the "Send" message button (QPushButton). Defines background, text color, border, padding, and font for the send button, including styles for hover and pressed states.

Returns
A QString containing the CSS rules.
Here is the call graph for this function:

◆ GetSentMessageStyle()

QString ChatStyle::GetSentMessageStyle ( )
static

Gets the stylesheet for message bubbles sent by the current user. Defines background, border, padding, margin, color, and font for sent messages. Typically aligned to one side (e.g., left) with a specific color scheme.

Returns
A QString containing the CSS rules.
Here is the call graph for this function:

◆ GetSystemMessageStyle()

QString ChatStyle::GetSystemMessageStyle ( )
static

Gets the stylesheet for system messages (e.g., user joined/left, errors). Defines background, border, padding, margin, color, and font for system messages. Typically centered or distinctively styled to differentiate from user messages.

Returns
A QString containing the CSS rules.
Here is the call graph for this function:

The documentation for this class was generated from the following files: