Skip to content

Commit 3b6a524

Browse files
committed
Draw window frame only for MDI windows
1 parent 511a587 commit 3b6a524

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

styles/qthaikustyle/haiku/qhaikustyle.cpp

+8-2
Original file line numberDiff line numberDiff line change
@@ -817,8 +817,14 @@ void QHaikuStyle::drawPrimitive(PrimitiveElement elem,
817817
painter->save();
818818
{
819819
bool active = (option->state & State_Active);
820-
qt_haiku_draw_windows_frame(painter, option->rect, active ? B_WINDOW_BORDER_COLOR : B_WINDOW_INACTIVE_BORDER_COLOR,
821-
BControlLook::B_LEFT_BORDER | BControlLook::B_RIGHT_BORDER | BControlLook::B_BOTTOM_BORDER);
820+
if (widget && widget->inherits("QMdiSubWindow")) {
821+
qt_haiku_draw_windows_frame(painter, option->rect, active ? B_WINDOW_BORDER_COLOR : B_WINDOW_INACTIVE_BORDER_COLOR,
822+
BControlLook::B_LEFT_BORDER | BControlLook::B_RIGHT_BORDER | BControlLook::B_BOTTOM_BORDER);
823+
} else {
824+
QColor menuBackground = option->palette.background().color().lighter(104);
825+
painter->fillRect(option->rect, menuBackground);
826+
proxy()->drawPrimitive(PE_FrameMenu, option, painter, widget);
827+
}
822828
}
823829
painter->restore();
824830
break;

0 commit comments

Comments
 (0)