소스 검색

bar placement

David Rose 16 년 전
부모
커밋
1c2ac14550
1개의 변경된 파일5개의 추가작업 그리고 6개의 파일을 삭제
  1. 5 6
      direct/src/plugin/p3dWinSplashWindow.cxx

+ 5 - 6
direct/src/plugin/p3dWinSplashWindow.cxx

@@ -397,13 +397,12 @@ make_progress_bar() {
 
   RECT rect;
   GetClientRect(_hwnd, &rect);
-  int width = rect.right - rect.left;
-  int height = rect.bottom - rect.top;
+  int win_width = rect.right - rect.left;
+  int win_height = rect.bottom - rect.top;
 
-  int bar_width = min((int)(width * 0.6), 400);
-  int bar_height = min((int)(height * 0.1), 24);
-  int bar_x = (width - bar_width) / 2;
-  int bar_y = (height - bar_height * 2);
+  int bar_x, bar_y, bar_width, bar_height;
+  get_bar_placement(win_width, win_height,
+                    bar_x, bar_y, bar_width, bar_height);
 
   _progress_bar = 
     CreateWindowEx(0, PROGRESS_CLASS, "", window_style,