mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 11:16:11 +00:00
[BROWSEUI] Properly fix CORE-13003 "Explorer address bar display problem"
The patches author is Doug Lyons. Thank you very much!
The patch is an addendum to 0.4.9-dev-732-g
ea0cc1c783
This commit is contained in:
parent
54c123aa45
commit
3050d93deb
2 changed files with 1 additions and 21 deletions
|
@ -43,7 +43,6 @@ CAddressBand::CAddressBand()
|
||||||
fGoButton = NULL;
|
fGoButton = NULL;
|
||||||
fComboBox = NULL;
|
fComboBox = NULL;
|
||||||
fGoButtonShown = false;
|
fGoButtonShown = false;
|
||||||
fAdjustNeeded = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CAddressBand::~CAddressBand()
|
CAddressBand::~CAddressBand()
|
||||||
|
@ -65,6 +64,7 @@ void CAddressBand::FocusChange(BOOL bFocus)
|
||||||
|
|
||||||
HRESULT STDMETHODCALLTYPE CAddressBand::GetBandInfo(DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO *pdbi)
|
HRESULT STDMETHODCALLTYPE CAddressBand::GetBandInfo(DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO *pdbi)
|
||||||
{
|
{
|
||||||
|
if (!m_hWnd || !pdbi) return E_FAIL; /* Verify window exists */
|
||||||
if (pdbi->dwMask & DBIM_MINSIZE)
|
if (pdbi->dwMask & DBIM_MINSIZE)
|
||||||
{
|
{
|
||||||
if (fGoButtonShown)
|
if (fGoButtonShown)
|
||||||
|
@ -467,8 +467,6 @@ LRESULT CAddressBand::OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHan
|
||||||
long newHeight;
|
long newHeight;
|
||||||
long newWidth;
|
long newWidth;
|
||||||
|
|
||||||
fAdjustNeeded = 1;
|
|
||||||
|
|
||||||
if (fGoButtonShown == false)
|
if (fGoButtonShown == false)
|
||||||
{
|
{
|
||||||
bHandled = FALSE;
|
bHandled = FALSE;
|
||||||
|
@ -524,23 +522,6 @@ LRESULT CAddressBand::OnWindowPosChanging(UINT uMsg, WPARAM wParam, LPARAM lPara
|
||||||
newHeight = positionInfoCopy.cy;
|
newHeight = positionInfoCopy.cy;
|
||||||
newWidth = positionInfoCopy.cx;
|
newWidth = positionInfoCopy.cx;
|
||||||
|
|
||||||
/*
|
|
||||||
Sometimes when we get here newWidth = 100 which comes from GetBandInfo and is less than the 200 that we need.
|
|
||||||
We need room for the "Address" text (50 pixels), the "GoButton" (50 pixels), the left and right borders (30 pixels)
|
|
||||||
the icon (20 pixels) and the ComboBox (50 pixels) for handling the text of the current directory. This is 200 pixels.
|
|
||||||
When newWidth = 100 the Addressband ComboBox will only have a single character because it becomes 2 pixels wide.
|
|
||||||
The hack below readjusts the width to the minimum required to allow seeing the whole text and prints out a debug message.
|
|
||||||
*/
|
|
||||||
|
|
||||||
if ((newWidth < 200) && (newWidth != 0))
|
|
||||||
{
|
|
||||||
if (fAdjustNeeded == 1)
|
|
||||||
{
|
|
||||||
ERR("CORE-13003 HACK: Addressband ComboBox width readjusted from %ld to 200.\n", newWidth);
|
|
||||||
newWidth = 200;
|
|
||||||
fAdjustNeeded = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
SendMessage(fGoButton, TB_GETITEMRECT, 0, reinterpret_cast<LPARAM>(&buttonBounds));
|
SendMessage(fGoButton, TB_GETITEMRECT, 0, reinterpret_cast<LPARAM>(&buttonBounds));
|
||||||
|
|
||||||
buttonWidth = buttonBounds.right - buttonBounds.left;
|
buttonWidth = buttonBounds.right - buttonBounds.left;
|
||||||
|
|
|
@ -43,7 +43,6 @@ private:
|
||||||
bool fGoButtonShown;
|
bool fGoButtonShown;
|
||||||
HIMAGELIST m_himlNormal;
|
HIMAGELIST m_himlNormal;
|
||||||
HIMAGELIST m_himlHot;
|
HIMAGELIST m_himlHot;
|
||||||
INT fAdjustNeeded;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CAddressBand();
|
CAddressBand();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue