Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

タイプ別設定のカラーで強調キーワードの共通設定を押すと表示されるダイアログの高さ調整、DPIスケーリング #443

Merged
merged 2 commits into from
Sep 15, 2018

Conversation

beru
Copy link
Contributor

@beru beru commented Sep 13, 2018

#439 に対応しました。

修正前

image

修正後

image

berryzplus
berryzplus previously approved these changes Sep 14, 2018
Copy link
Contributor

@berryzplus berryzplus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTMです。

ビルドして表示してみましたが、うちの環境でもいい感じに表示されています。DPIスケーリングが独自処理になってる点は、折を見て util/window.h の再整備と合わせて進めていきたいな、と思ってます。

auto dpiY = GetDeviceCaps(screen,LOGPIXELSY);
::ReleaseDC(0, screen);
auto dlgWidth = rc.right - rc.left;
auto dlgHeight = btnRect.bottom - rc.top + MulDiv(15, dpiY, 96);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MulDivに渡す値が 10 → 15 になってますが意図的に変えている、でいいですよね?
PRの表示例から、プロパティシート表示と同じに見えるように調整してる雰囲気を感じました。

サクラエディタの独自定義物には、DPI変換関数が含まれています。

inline int DpiScaleY(int y){return CDPI::ScaleY(y);}

やってることは beru さんの書いたコードと同じ(?)なので、プロジェクト的な観点からすればこれを流用したほうがよいような気がしました。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

おぉ、そんなのがあったんですね。存在を知りませんでした。ちゃんと似たようなコードが無いか調べてから実装しないと駄目ですね。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MulDivに渡す値が 10 → 15 になってますが意図的に変えている、でいいですよね?

はい、これは意図的に変えています。10 だとちょっと足りない感じなんですよね。
誰かが意図的に 10 に設定していてこの変更に憤慨していたら先に謝っておきます。

Copy link
Contributor

@berryzplus berryzplus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ご対応ありがとうございます。LGTMです。

@beru
Copy link
Contributor Author

beru commented Sep 15, 2018

レビューありがとうございました。では Merge してしまいます。
何か問題があった場合はまた別のPRで修正する事にしましょう。

@beru beru merged commit 470b812 into sakura-editor:master Sep 15, 2018
@beru beru deleted the CPropComKeyword_size branch September 15, 2018 03:26
@m-tmatma m-tmatma added this to the next release milestone Oct 21, 2018
HoppingTappy pushed a commit to HoppingTappy/sakura that referenced this pull request Jun 11, 2019
タイプ別設定のカラーで強調キーワードの共通設定を押すと表示されるダイアログの高さ調整、DPIスケーリング
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants