|
|
|
@ -499,12 +499,12 @@ void TabBarPlus::setCloseBtnImageList()
|
|
|
|
|
if (NppDarkMode::isEnabled()) |
|
|
|
|
{ |
|
|
|
|
iconSize = g_TabCloseBtnSize_DM; |
|
|
|
|
ids = { IDR_CLOSETAB_DM, IDR_CLOSETAB_INACT_DM, IDR_CLOSETAB_HOVER_DM, IDR_CLOSETAB_PUSH_DM }; |
|
|
|
|
ids = { IDR_CLOSETAB_DM, IDR_CLOSETAB_INACT_DM, IDR_CLOSETAB_HOVERIN_DM, IDR_CLOSETAB_HOVERONTAB_DM, IDR_CLOSETAB_PUSH_DM }; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
iconSize = g_TabCloseBtnSize; |
|
|
|
|
ids = { IDR_CLOSETAB, IDR_CLOSETAB_INACT, IDR_CLOSETAB_HOVER, IDR_CLOSETAB_PUSH }; |
|
|
|
|
ids = { IDR_CLOSETAB, IDR_CLOSETAB_INACT, IDR_CLOSETAB_HOVERIN, IDR_CLOSETAB_HOVERONTAB, IDR_CLOSETAB_PUSH }; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (_hCloseBtnImgLst != nullptr) |
|
|
|
@ -538,12 +538,12 @@ void TabBarPlus::setPinBtnImageList()
|
|
|
|
|
if (NppDarkMode::isEnabled()) |
|
|
|
|
{ |
|
|
|
|
iconSize = g_TabPinBtnSize_DM; |
|
|
|
|
ids = { IDR_PINTAB_DM, IDR_PINTAB_HOVER_DM, IDR_PINTAB_PINNED_DM, IDR_PINTAB_PINNEDHOVER_DM }; |
|
|
|
|
ids = { IDR_PINTAB_DM, IDR_PINTAB_INACT_DM, IDR_PINTAB_HOVERIN_DM, IDR_PINTAB_HOVERONTAB_DM, IDR_PINTAB_PINNED_DM, IDR_PINTAB_PINNEDHOVERIN_DM }; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
iconSize = g_TabPinBtnSize; |
|
|
|
|
ids = { IDR_PINTAB, IDR_PINTAB_HOVER, IDR_PINTAB_PINNED, IDR_PINTAB_PINNEDHOVER }; |
|
|
|
|
ids = { IDR_PINTAB, IDR_PINTAB_INACT, IDR_PINTAB_HOVERIN, IDR_PINTAB_HOVERONTAB, IDR_PINTAB_PINNED, IDR_PINTAB_PINNEDHOVERIN }; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (_hPinBtnImgLst != nullptr) |
|
|
|
@ -912,7 +912,14 @@ LRESULT TabBarPlus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPara
|
|
|
|
|
_isCloseHover = false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (isFromTabToTab || _isCloseHover != isCloseHoverOld) |
|
|
|
|
if (isFromTabToTab || _isCloseHover != isCloseHoverOld || _currentHoverTabItem != -1) |
|
|
|
|
{ |
|
|
|
|
if (_currentHoverTabItem != -1 || isFromTabToTab) |
|
|
|
|
{ |
|
|
|
|
InvalidateRect(hwnd, ¤tHoverTabRectOld, FALSE); |
|
|
|
|
InvalidateRect(hwnd, &_currentHoverTabRect, FALSE); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
if (isCloseHoverOld && (isFromTabToTab || !_isCloseHover)) |
|
|
|
|
InvalidateRect(hwnd, ¤tHoverTabRectOld, FALSE); |
|
|
|
@ -920,6 +927,7 @@ LRESULT TabBarPlus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPara
|
|
|
|
|
if (_isCloseHover) |
|
|
|
|
InvalidateRect(hwnd, &_currentHoverTabRect, FALSE); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (_isCloseHover) |
|
|
|
|
{ |
|
|
|
@ -945,7 +953,14 @@ LRESULT TabBarPlus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPara
|
|
|
|
|
_isPinHover = false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (isFromTabToTab || _isPinHover != isPinHoverOld) |
|
|
|
|
if (isFromTabToTab || _isPinHover != isPinHoverOld || _currentHoverTabItem != -1) |
|
|
|
|
{ |
|
|
|
|
if (_currentHoverTabItem != -1 || isFromTabToTab) |
|
|
|
|
{ |
|
|
|
|
InvalidateRect(hwnd, ¤tHoverTabRectOld, FALSE); |
|
|
|
|
InvalidateRect(hwnd, &_currentHoverTabRect, FALSE); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
if (isPinHoverOld && (isFromTabToTab || !_isPinHover)) |
|
|
|
|
InvalidateRect(hwnd, ¤tHoverTabRectOld, FALSE); |
|
|
|
@ -953,6 +968,7 @@ LRESULT TabBarPlus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPara
|
|
|
|
|
if (_isPinHover) |
|
|
|
|
InvalidateRect(hwnd, &_currentHoverTabRect, FALSE); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (_isPinHover) |
|
|
|
|
{ |
|
|
|
@ -970,7 +986,6 @@ LRESULT TabBarPlus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPara
|
|
|
|
|
|
|
|
|
|
case WM_MOUSELEAVE: |
|
|
|
|
{ |
|
|
|
|
if (_isCloseHover || _isPinHover) |
|
|
|
|
InvalidateRect(hwnd, &_currentHoverTabRect, FALSE); |
|
|
|
|
|
|
|
|
|
_currentHoverTabItem = -1; |
|
|
|
@ -1455,9 +1470,9 @@ void TabBarPlus::drawItem(DRAWITEMSTRUCT* pDrawItemStruct, bool isDarkMode)
|
|
|
|
|
|
|
|
|
|
if (_isCloseHover && (_currentHoverTabItem == nTab)) |
|
|
|
|
{ |
|
|
|
|
if (_whichCloseClickDown == -1) // hover
|
|
|
|
|
if (_whichCloseClickDown == -1) // hover in
|
|
|
|
|
{ |
|
|
|
|
idxCloseImg = _closeTabHoverIdx; |
|
|
|
|
idxCloseImg = _closeTabHoverInIdx; |
|
|
|
|
} |
|
|
|
|
else if (_whichCloseClickDown == _currentHoverTabItem) // pushed
|
|
|
|
|
{ |
|
|
|
@ -1466,7 +1481,7 @@ void TabBarPlus::drawItem(DRAWITEMSTRUCT* pDrawItemStruct, bool isDarkMode)
|
|
|
|
|
} |
|
|
|
|
else if (!isSelected) // inactive
|
|
|
|
|
{ |
|
|
|
|
idxCloseImg = _closeTabInactIdx; |
|
|
|
|
idxCloseImg = (_currentHoverTabItem == nTab) ? _closeTabHoverOnTabIdx : _closeTabInactIdx; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
RECT buttonRect = _closeButtonZone.getButtonRectFrom(rect, _isVertical); |
|
|
|
@ -1523,7 +1538,7 @@ void TabBarPlus::drawItem(DRAWITEMSTRUCT* pDrawItemStruct, bool isDarkMode)
|
|
|
|
|
{ |
|
|
|
|
if (_whichPinClickDown == -1) // hover
|
|
|
|
|
{ |
|
|
|
|
idxPinImg = _unpinnedHoverIdx; |
|
|
|
|
idxPinImg = _unpinnedHoverInIdx; |
|
|
|
|
} |
|
|
|
|
else if (_whichPinClickDown == _currentHoverTabItem) // pushed
|
|
|
|
|
{ |
|
|
|
@ -1533,13 +1548,13 @@ void TabBarPlus::drawItem(DRAWITEMSTRUCT* pDrawItemStruct, bool isDarkMode)
|
|
|
|
|
} |
|
|
|
|
else // unpinned inactive
|
|
|
|
|
{ |
|
|
|
|
idxPinImg = _unpinnedIdx; |
|
|
|
|
idxPinImg = (_currentHoverTabItem == nTab) ? _unpinnedHoverOnTabIdx : _unpinnedInactIdx; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
else // current
|
|
|
|
|
{ |
|
|
|
|
if (_isPinHover && (_currentHoverTabItem == nTab)) // hover
|
|
|
|
|
idxPinImg = _unpinnedHoverIdx; |
|
|
|
|
idxPinImg = _unpinnedHoverInIdx; |
|
|
|
|
else |
|
|
|
|
idxPinImg = _unpinnedIdx; |
|
|
|
|
} |
|
|
|
|