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

fix CListUI::GetClientPos() #30

Merged
merged 2 commits into from
Apr 13, 2024
Merged

fix CListUI::GetClientPos() #30

merged 2 commits into from
Apr 13, 2024

Conversation

wuwao1
Copy link
Contributor

@wuwao1 wuwao1 commented Apr 13, 2024

CListUI没有滚动条,实际作用的是m_pList的滚动条,GetClientPos应该剔除m_pList的滚动条,而不是CListUI的滚动条.所以override GetClientPos.

	CScrollBarUI* CListUI::GetVerticalScrollBar () const {
		return m_pList->GetVerticalScrollBar ();
	}

	CScrollBarUI* CListUI::GetHorizontalScrollBar () const {
		return m_pList->GetHorizontalScrollBar ();
	}

@wuwao1
Copy link
Contributor Author

wuwao1 commented Apr 13, 2024

假如xml或者code中指定了控件大小,优先返回指定大小,否者 m_cxyFixed.cx , m_cxyFixed.cy为0,由父容器安排子控件大小

			if (sText.empty())
				return { m_cxyFixed.cx , m_cxyFixed.cy };

@fawdlstty
Copy link
Owner

thanks for prprpr

@fawdlstty fawdlstty merged commit e97a930 into fawdlstty:master Apr 13, 2024
1 check passed
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.

2 participants