Mercurial > dwindows
comparison win/dw.c @ 2139:b1521c8f7861
Win: A few minor fixes to that last commit.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 09 Jul 2020 10:16:54 +0000 |
parents | 55263d21b399 |
children | b6e09fb597aa |
comparison
equal
deleted
inserted
replaced
2138:55263d21b399 | 2139:b1521c8f7861 |
---|---|
818 | 818 |
819 /* Return a margins struct based on the calculated window rect */ | 819 /* Return a margins struct based on the calculated window rect */ |
820 MARGINS _dw_rect_to_margins(RECT rect) | 820 MARGINS _dw_rect_to_margins(RECT rect) |
821 { | 821 { |
822 /* Left, Right, Top, Bottom */ | 822 /* Left, Right, Top, Bottom */ |
823 MARGINS mar = { 1, 1, rect.top, 1 }, none = {0}; | 823 MARGINS mar = { rect.left, rect.right, rect.top, rect.bottom }, none = {0}; |
824 | 824 |
825 if(_DW_DARK_MODE_ALLOWED > DW_DARK_MODE_BASIC & _DW_DARK_MODE_ENABLED) | 825 if(_DW_DARK_MODE_ALLOWED > DW_DARK_MODE_BASIC & _DW_DARK_MODE_ENABLED) |
826 return mar; | 826 return mar; |
827 return none; | 827 return none; |
828 } | 828 } |
2726 | 2726 |
2727 RefreshTitleBarThemeColor(hWnd); | 2727 RefreshTitleBarThemeColor(hWnd); |
2728 _dw_set_child_window_theme(hWnd, 0); | 2728 _dw_set_child_window_theme(hWnd, 0); |
2729 EnumChildWindows(hWnd, _dw_set_child_window_theme, 0); | 2729 EnumChildWindows(hWnd, _dw_set_child_window_theme, 0); |
2730 #ifdef DARK_MODE_TITLEBAR_MENU | 2730 #ifdef DARK_MODE_TITLEBAR_MENU |
2731 if(_DW_DARK_MODE_SUPPORTED > DW_DARK_MODE_BASIC && _DW_DARK_MODE_ENABLED) | 2731 if(_DW_DARK_MODE_ALLOWED > DW_DARK_MODE_BASIC && _DW_DARK_MODE_ENABLED) |
2732 SetMenu(hWnd, NULL); | 2732 SetMenu(hWnd, NULL); |
2733 else | 2733 else |
2734 { | 2734 { |
2735 HMENU menu = (HMENU)dw_window_get_data(hWnd, "_dw_menu"); | 2735 HMENU menu = (HMENU)dw_window_get_data(hWnd, "_dw_menu"); |
2736 SetMenu(hWnd, menu); | 2736 SetMenu(hWnd, menu); |
5820 SetParent(hwndframe, hwndOwner); | 5820 SetParent(hwndframe, hwndOwner); |
5821 | 5821 |
5822 #ifdef AEROGLASS | 5822 #ifdef AEROGLASS |
5823 /* Determine the borders of the default window frame */ | 5823 /* Determine the borders of the default window frame */ |
5824 AdjustWindowRectEx(&(newbox->cinfo.rect), flStyle, FALSE, 0); | 5824 AdjustWindowRectEx(&(newbox->cinfo.rect), flStyle, FALSE, 0); |
5825 newbox->cinfo.rect.left *= -1; | 5825 newbox->cinfo.rect.right = newbox->cinfo.rect.left = newbox->cinfo.rect.bottom = 1; |
5826 newbox->cinfo.rect.top *= -1; | 5826 newbox->cinfo.rect.top *= -1; |
5827 | 5827 |
5828 if(flStyle & DW_FCF_COMPOSITED) | 5828 if(flStyle & DW_FCF_COMPOSITED) |
5829 { | 5829 { |
5830 /* Attempt to enable Aero glass background on the entire window */ | 5830 /* Attempt to enable Aero glass background on the entire window */ |