-
Notifications
You must be signed in to change notification settings - Fork 162
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
プロパティシートに対してシステムフォントを設定 #1425
プロパティシートに対してシステムフォントを設定 #1425
Conversation
今回のフォント変更が影響してか共通設定ダイアログの「Custom Menu」タブの位置が 1 段目から 2 段目へと移動してしていますが、これは日本語の時と同じ並びになるので問題ないかなと思っています。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
コードは問題ないと思います。
表示確認を行う能力はないので、他の方にお任せします。
@@ -257,13 +257,19 @@ static LRESULT CALLBACK PropSheetWndProc( HWND hwnd, UINT uMsg, WPARAM wParam, L | |||
*/ | |||
static int CALLBACK PropSheetProc( HWND hwndDlg, UINT uMsg, LPARAM lParam ) | |||
{ | |||
// プロパティシートの初期化時にボタン追加、プロパティシートのサブクラス化を行う | |||
// プロパティシートの初期化時にシステムフォント設定、ボタン追加、プロパティシートのサブクラス化を行う |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
指摘じゃないですが、コメント変更は必要でしょうか?
ここでやってるのは「初期化時にカスタマイズする」ですが、
具体的な内容を追記していくと「内容が正確でない」だとか、
「ここでソレやるの?」とかの無駄な指摘の温床になるような気もします。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
早速コメントありがとうございます。
個人的にはコード見てわかる内容はコメントにしてほしくない派ですが、すでにあるのものはメンテした方がいいかなとも思い、ちょっと迷いました。
では、ここのコメントは前のままとしておけばよいでしょうか。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
指摘ではないのでどちらでもよいです。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
了解しました。1b00f2d のままにしておきます。
✅ Build sakura 1.0.3158 completed (commit 1b00f2d177 by @suconbu) |
フォントが変わったのは分かりますが、変更前がギザギザしているのが分からないです。 |
ギザギザっていうのは多分フォントのラスタライズでアンチエイリアスが掛かっていない事を指しているんだと思います。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
問題ないと思います。
@return ダイアログボックスに設定されたフォントハンドル(破棄禁止) | ||
*/ | ||
HFONT UpdateDialogFont( HWND hwnd ) | ||
HFONT UpdateDialogFont( HWND hwnd, BOOL force ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BOOL force
の代わりに bool unconditional
とかいうのも書き方の候補として思い浮かびました。
前者の方がタイプ量が少ないですね。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ここの用途からするとunconditional
の方が合っていそうですね。
一方で否定形の論理型変数は分かりにくい時があるかもと思いました。
レビューありがとうございました。 |
PR の目的
共通設定・タイプ別設定ダイアログのタブと下部にあるボタンについて、言語設定が英語の時のみ文字がギザギザしていて見栄えが悪いため、この部分に Windows のシステムフォントが使われるようにします。
※ #1421 (comment) で挙げていた問題点
共通設定ダイアログの例:
カテゴリ
PR の背景
PR のメリット
PR のデメリット (トレードオフとかあれば)
特にないと思います。
仕様・動作説明
言語設定が英語の時のプロパティシート部のフォントが MS Shell Dlg (MS UI Gothic) から Windows のシステムフォント (Yu Gothic UI 等) に変わります。
テスト内容
PR の影響範囲
※
MyPropertySheet
関数を呼び出しているもの関連 issue, PR
#1421
参考資料
https://www.codeguru.com/cpp/controls/propertysheet/previoussectionmanager/article.php/c16651/Custom-Font-in-Property-Sheets.htm