-
Notifications
You must be signed in to change notification settings - Fork 165
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
ツールバーの検索ボックスにフォーカスを当てていないにも関わらず文字列が選択状態として表示される現象が起きないように対策 #1724
Merged
beru
merged 1 commit into
sakura-editor:master
from
beru:toolbar_combo_born_to_keep_social_distance
Sep 8, 2021
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -293,6 +293,9 @@ void CMainToolBar::CreateToolBar( void ) | |
//位置とサイズを取得する | ||
rc.right = rc.left = rc.top = rc.bottom = 0; | ||
Toolbar_GetItemRect( m_hwndToolBar, count-1, &rc ); | ||
// Social Distance | ||
rc.left += cxBorder; | ||
rc.right -= cxBorder; | ||
|
||
//コンボボックスを作る | ||
m_hwndSearchBox = CreateWindow( WC_COMBOBOX, L"Combo", | ||
|
@@ -334,15 +337,15 @@ void CMainToolBar::CreateToolBar( void ) | |
|
||
CDialog::SetComboBoxDeleter(m_hwndSearchBox, &m_cRecentSearch); | ||
|
||
// コンボボックスの位置と幅を調整する | ||
// コンボボックスの垂直位置を調整する | ||
CMyRect rcCombo; | ||
::GetWindowRect( m_hwndSearchBox, &rcCombo ); | ||
::SetWindowPos( m_hwndSearchBox, NULL, | ||
rc.left + cxBorder, | ||
rc.left, //作ったときと同じ値を指定 | ||
rc.top + (rc.bottom - rc.top - rcCombo.Height()) / 2, | ||
rcCombo.Width() - cxBorder * 2, | ||
rcCombo.Height(), | ||
SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSENDCHANGING ); | ||
0, //rcCombo.Width()のまま変えない | ||
0, //rcCombo.Height()のまま変えない | ||
SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSENDCHANGING ); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. そうですね、何故かウィンドウ作成後にサイズを変えるとテキスト選択状態の見た目になってしまうという。。 |
||
} | ||
break; | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
時事用語ですね。beforeコロナ時代にあった「不適切な密着状態」を戒めるコトバですな。
ツールバーのボタン同士に人間社会が形成されているとは考えづらいので誤用と考えられます。
まぁ、まともな理解力を持った人にはニュアンス伝わると思うのでこのままでよいと思いますが。
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.
ここは意図的にこの言葉を使いました。記念として…。