Skip to content

Commit

Permalink
Merge pull request #443 from beru/CPropComKeyword_size
Browse files Browse the repository at this point in the history
タイプ別設定のカラーで強調キーワードの共通設定を押すと表示されるダイアログの高さ調整、DPIスケーリング
  • Loading branch information
beru authored Sep 15, 2018
2 parents 7cea0e6 + 1a975ea commit 470b812
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions sakura_core/prop/CPropComKeyword.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "typeprop/CImpExpManager.h" // 20210/4/23 Uchi
#include "dlg/CDlgInput1.h"
#include "util/shell.h"
#include "util/window.h"
#include <memory>
#include "sakura_rc.h"
#include "sakura.hh"
Expand Down Expand Up @@ -108,11 +109,12 @@ INT_PTR CPropKeyword::DispatchEvent(
::SetWindowLongPtr( hwndDlg, DWLP_USER, lParam );
if( wParam == IDOK ){ // 独立ウィンドウ
hwndCtl = ::GetDlgItem( hwndDlg, IDOK );
GetWindowRect( hwndCtl, &rc );
int i = rc.bottom; // OK,CANCELボタンの下端

RECT btnRect;
GetWindowRect( hwndCtl, &btnRect );
GetWindowRect( hwndDlg, &rc );
SetWindowPos( hwndDlg, NULL, 0, 0, rc.right-rc.left, i-rc.top+10, SWP_NOZORDER|SWP_NOMOVE );
auto dlgWidth = rc.right - rc.left;
auto dlgHeight = btnRect.bottom - rc.top + DpiScaleY(15);
SetWindowPos( hwndDlg, NULL, 0, 0, dlgWidth, dlgHeight, SWP_NOZORDER|SWP_NOMOVE );
std::tstring title = LS(STR_PROPCOMMON);
title += _T(" - ");
title += LS(STR_PROPCOMMON_KEYWORD);
Expand Down

0 comments on commit 470b812

Please sign in to comment.