Kaydet (Commit) af659d4c authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Let's make it so that selected = highlighted + logically selected.

Being selected but not highlighted makes no sense.  This way, an entry
can be highlighted without being selected, but can never be selected without
being highlighted.

Change-Id: I6c469a1d2cf0df79c2e5e4ff4120af5efd5f6103
üst 949a4e15
...@@ -36,9 +36,9 @@ struct SvViewDataItem ...@@ -36,9 +36,9 @@ struct SvViewDataItem
* SvTreeListBox::CreateViewData(). The item array contains the same number * SvTreeListBox::CreateViewData(). The item array contains the same number
* of items as that of the items in its corresponding tree list entry. * of items as that of the items in its corresponding tree list entry.
* *
* When an entry is selected, it is both logically and visually selected. * When an entry is selected, it is logically selected and visually
* When an entry is highlighted, it appears selected visually, but it's not * highlighted. When an entry is only highlighted, it looks visually
* logically selected. * highlighted, but not logically selected.
*/ */
class SVT_DLLPUBLIC SvViewDataEntry class SVT_DLLPUBLIC SvViewDataEntry
{ {
......
...@@ -3007,9 +3007,7 @@ long SvTreeListBox::PaintEntry1(SvTreeListEntry* pEntry,long nLine,sal_uInt16 nT ...@@ -3007,9 +3007,7 @@ long SvTreeListBox::PaintEntry1(SvTreeListEntry* pEntry,long nLine,sal_uInt16 nT
int bSelTab = nFlags & SV_LBOXTAB_SHOW_SELECTION; int bSelTab = nFlags & SV_LBOXTAB_SHOW_SELECTION;
sal_uInt16 nItemType = pItem->GetType(); sal_uInt16 nItemType = pItem->GetType();
bool bHighlighted = pViewDataEntry->IsHighlighted() || pViewDataEntry->IsSelected(); if (pViewDataEntry->IsHighlighted() && bSelTab && !pViewDataEntry->IsCursored())
if (bHighlighted && bSelTab && !pViewDataEntry->IsCursored())
{ {
Color aNewWallColor = rSettings.GetHighlightColor(); Color aNewWallColor = rSettings.GetHighlightColor();
if ( !bInUse || nItemType != SV_ITEM_ID_LBOXCONTEXTBMP ) if ( !bInUse || nItemType != SV_ITEM_ID_LBOXCONTEXTBMP )
......
...@@ -45,7 +45,7 @@ SvViewDataEntry::SvViewDataEntry() : ...@@ -45,7 +45,7 @@ SvViewDataEntry::SvViewDataEntry() :
SvViewDataEntry::SvViewDataEntry( const SvViewDataEntry& rData ) : SvViewDataEntry::SvViewDataEntry( const SvViewDataEntry& rData ) :
nVisPos(rData.nVisPos), nVisPos(rData.nVisPos),
mbSelected(false), mbSelected(false),
mbHighlighted(rData.mbHighlighted), mbHighlighted(false),
mbExpanded(rData.mbExpanded), mbExpanded(rData.mbExpanded),
mbFocused(false), mbFocused(false),
mbCursored(rData.mbCursored), mbCursored(rData.mbCursored),
...@@ -105,6 +105,7 @@ void SvViewDataEntry::SetCursored( bool bCursored ) ...@@ -105,6 +105,7 @@ void SvViewDataEntry::SetCursored( bool bCursored )
void SvViewDataEntry::SetSelected( bool bSelected ) void SvViewDataEntry::SetSelected( bool bSelected )
{ {
mbSelected = bSelected; mbSelected = bSelected;
mbHighlighted = bSelected;
} }
void SvViewDataEntry::SetHighlighted( bool bHighlighted ) void SvViewDataEntry::SetHighlighted( bool bHighlighted )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment