* @brief Returns the current title bar height in pixels. */
| 907 | * @brief Returns the current title bar height in pixels. |
| 908 | */ |
| 909 | int Window::titleBarHeight() const |
| 910 | { |
| 911 | if (!m_window) |
| 912 | return CSD::TitleBarHeight; |
| 913 | |
| 914 | const auto state = m_window->windowStates(); |
| 915 | if (state & Qt::WindowFullScreen) |
| 916 | return 0; |
| 917 | |
| 918 | if (state & Qt::WindowMaximized) |
| 919 | return CSD::TitleBarHeightMaximized; |
| 920 | |
| 921 | return CSD::TitleBarHeight; |
| 922 | } |
| 923 | |
| 924 | /** |
| 925 | * @brief Sets a custom color for the title bar. |