@@ -2,26 +2,33 @@ use crate::app::SwitchAppsState;
22use crate :: utils:: { check_error, get_moinitor_rect, is_light_theme, is_win11} ;
33
44use anyhow:: { Context , Result } ;
5- use windows:: Win32 :: Foundation :: { COLORREF , POINT , RECT , SIZE } ;
6- use windows:: Win32 :: Graphics :: Gdi :: {
7- CreateCompatibleBitmap , CreateCompatibleDC , CreateRoundRectRgn , CreateSolidBrush , DeleteDC ,
8- DeleteObject , FillRect , FillRgn , ReleaseDC , SelectObject , SetStretchBltMode , StretchBlt ,
9- AC_SRC_ALPHA , AC_SRC_OVER , BLENDFUNCTION , HALFTONE , HBITMAP , HBRUSH , HDC , HPALETTE , SRCCOPY ,
5+ use windows:: Win32 :: {
6+ Foundation :: { COLORREF , HWND , POINT , RECT , SIZE } ,
7+ Graphics :: {
8+ Gdi :: {
9+ CreateCompatibleBitmap , CreateCompatibleDC , CreateRoundRectRgn , CreateSolidBrush ,
10+ DeleteDC , DeleteObject , FillRect , FillRgn , GetDC , ReleaseDC , SelectObject ,
11+ SetStretchBltMode , StretchBlt , AC_SRC_ALPHA , AC_SRC_OVER , BLENDFUNCTION , HALFTONE ,
12+ HBITMAP , HBRUSH , HDC , HPALETTE , SRCCOPY ,
13+ } ,
14+ GdiPlus :: {
15+ FillModeAlternate , GdipAddPathArc , GdipClosePathFigure , GdipCreateBitmapFromHBITMAP ,
16+ GdipCreateFromHDC , GdipCreatePath , GdipCreatePen1 , GdipDeleteBrush , GdipDeleteGraphics ,
17+ GdipDeletePath , GdipDeletePen , GdipDisposeImage , GdipDrawImageRect , GdipFillPath ,
18+ GdipFillRectangle , GdipGetPenBrushFill , GdipSetInterpolationMode , GdipSetSmoothingMode ,
19+ GdiplusShutdown , GdiplusStartup , GdiplusStartupInput , GpBitmap , GpBrush , GpGraphics ,
20+ GpImage , GpPath , GpPen , InterpolationModeHighQualityBicubic , SmoothingModeAntiAlias ,
21+ Unit ,
22+ } ,
23+ } ,
24+ UI :: {
25+ Input :: KeyboardAndMouse :: SetFocus ,
26+ WindowsAndMessaging :: {
27+ DrawIconEx , GetCursorPos , ShowWindow , UpdateLayeredWindow , DI_NORMAL , SW_HIDE , SW_SHOW ,
28+ ULW_ALPHA ,
29+ } ,
30+ } ,
1031} ;
11- use windows:: Win32 :: Graphics :: GdiPlus :: {
12- FillModeAlternate , GdipAddPathArc , GdipClosePathFigure , GdipCreateBitmapFromHBITMAP ,
13- GdipCreateFromHDC , GdipCreatePath , GdipCreatePen1 , GdipDeleteBrush , GdipDeleteGraphics ,
14- GdipDeletePath , GdipDeletePen , GdipDisposeImage , GdipDrawImageRect , GdipFillPath ,
15- GdipFillRectangle , GdipGetPenBrushFill , GdipSetInterpolationMode , GdipSetSmoothingMode ,
16- GdiplusShutdown , GdiplusStartup , GdiplusStartupInput , GpBitmap , GpBrush , GpGraphics , GpImage ,
17- GpPath , GpPen , InterpolationModeHighQualityBicubic , SmoothingModeAntiAlias , Unit ,
18- } ;
19- use windows:: Win32 :: UI :: Input :: KeyboardAndMouse :: SetFocus ;
20- use windows:: Win32 :: UI :: WindowsAndMessaging :: {
21- DrawIconEx , GetCursorPos , ShowWindow , UpdateLayeredWindow , DI_NORMAL , SW_HIDE , SW_SHOW ,
22- ULW_ALPHA ,
23- } ;
24- use windows:: Win32 :: { Foundation :: HWND , Graphics :: Gdi :: GetDC } ;
2532
2633pub const BG_DARK_COLOR : u32 = 0x4c4c4c ;
2734pub const FG_DARK_COLOR : u32 = 0x3b3b3b ;
0 commit comments