Tracker: No count view pop up on file panels or open with windows either.
Change-Id: I1694cf92e72f7f15120ffa0a96eb13ba9e49aa93 Reviewed-on: https://review.haiku-os.org/c/haiku/+/10937 Haiku-Format: Haiku-format Bot <[email protected]> Reviewed-by: John Scipione <[email protected]>
This commit is contained in:
@@ -267,7 +267,8 @@ BCountView::Draw(BRect updateRect)
|
|||||||
|
|
||||||
// leave room for pop up indicator
|
// leave room for pop up indicator
|
||||||
float popUpWidth = be_control_look->DefaultItemSpacing();
|
float popUpWidth = be_control_look->DefaultItemSpacing();
|
||||||
if (!fPoseView->TargetModel()->IsRoot())
|
bool popsUp = ShouldHaveDirectoryPopUpMenu();
|
||||||
|
if (popsUp)
|
||||||
textRect.right -= popUpWidth;
|
textRect.right -= popUpWidth;
|
||||||
|
|
||||||
int32 truncateMode;
|
int32 truncateMode;
|
||||||
@@ -290,7 +291,7 @@ BCountView::Draw(BRect updateRect)
|
|||||||
DrawString(itemString.String());
|
DrawString(itemString.String());
|
||||||
|
|
||||||
// draw pop up indicator
|
// draw pop up indicator
|
||||||
if (!fPoseView->TargetModel()->IsRoot()) {
|
if (popsUp) {
|
||||||
BRect arrowRect(bounds);
|
BRect arrowRect(bounds);
|
||||||
arrowRect.left = bounds.right - popUpWidth;
|
arrowRect.left = bounds.right - popUpWidth;
|
||||||
float fgTint = (color.IsLight() ? B_DARKEN_4_TINT : 2.f - B_DARKEN_4_TINT);
|
float fgTint = (color.IsLight() ? B_DARKEN_4_TINT : 2.f - B_DARKEN_4_TINT);
|
||||||
@@ -346,10 +347,7 @@ BCountView::MouseDown(BPoint)
|
|||||||
window->Activate();
|
window->Activate();
|
||||||
window->UpdateIfNeeded();
|
window->UpdateIfNeeded();
|
||||||
|
|
||||||
if (fPoseView->IsFilePanel() || fPoseView->TargetModel() == NULL)
|
if (fPoseView->TargetModel() == NULL || !ShouldHaveDirectoryPopUpMenu())
|
||||||
return;
|
|
||||||
|
|
||||||
if (window->TargetModel()->IsRoot())
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
BDirMenu menu(NULL, be_app, B_REFS_RECEIVED);
|
BDirMenu menu(NULL, be_app, B_REFS_RECEIVED);
|
||||||
@@ -375,6 +373,14 @@ BCountView::AttachedToWindow()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
BCountView::ShouldHaveDirectoryPopUpMenu()
|
||||||
|
{
|
||||||
|
return !(fPoseView->TargetModel()->IsRoot() || fPoseView->IsFilePanel()
|
||||||
|
|| fPoseView->IsOpenWithView());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BCountView::SetTypeAhead(const char* string)
|
BCountView::SetTypeAhead(const char* string)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -61,6 +61,8 @@ public:
|
|||||||
void StartBarberPole();
|
void StartBarberPole();
|
||||||
void EndBarberPole();
|
void EndBarberPole();
|
||||||
|
|
||||||
|
bool ShouldHaveDirectoryPopUpMenu();
|
||||||
|
|
||||||
void SetTypeAhead(const char*);
|
void SetTypeAhead(const char*);
|
||||||
const char* TypeAhead() const;
|
const char* TypeAhead() const;
|
||||||
bool IsTypingAhead() const;
|
bool IsTypingAhead() const;
|
||||||
|
|||||||
Reference in New Issue
Block a user