Tracker InfoWindow: fix regressions
- Misplaced popup window for showing truncated paths in full (#15301) - Crash when using Alt + E to edit the filename (#15302) - "Link To" information for symlinks does not fit in window (#15303) Change-Id: I72416ab4473e0b01c33817b9364eb9e9e59172e1 Reviewed-on: https://review.haiku-os.org/c/haiku/+/1747 Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
2140520f96
commit
9bb8d3a40a
@@ -120,6 +120,7 @@ DoCatalogs libtracker.so :
|
||||
FindPanel.cpp
|
||||
FSClipboard.cpp
|
||||
FSUtils.cpp
|
||||
GeneralInfoView.cpp
|
||||
InfoWindow.cpp
|
||||
LocalizedFolders.h
|
||||
Model.cpp
|
||||
|
||||
@@ -188,7 +188,10 @@ GeneralInfoView::GeneralInfoView(Model* model)
|
||||
|
||||
// Keep some free space for the stuff we print ourselves
|
||||
float lineHeight = CurrentFontHeight();
|
||||
GroupLayout()->SetInsets(kBorderMargin, lineHeight * 7,
|
||||
int lineCount = 7;
|
||||
if (model->IsSymLink())
|
||||
lineCount += 1; // Add space for "Link to" line
|
||||
GroupLayout()->SetInsets(kBorderMargin, lineHeight * lineCount,
|
||||
B_USE_WINDOW_SPACING, B_USE_WINDOW_SPACING);
|
||||
|
||||
// Add a preferred handler pop-up menu if this item
|
||||
@@ -553,9 +556,7 @@ GeneralInfoView::MouseMoved(BPoint where, uint32, const BMessage* dragMessage)
|
||||
|
||||
if (font.StringWidth(fPathStr.String()) > maxWidth) {
|
||||
fTrackingState = no_track;
|
||||
BRect rect(fPathRect);
|
||||
rect.OffsetBy(Window()->Frame().left,
|
||||
Window()->Frame().top);
|
||||
BRect rect = ConvertToScreen(fPathRect);
|
||||
|
||||
if (fPathWindow == NULL
|
||||
|| BMessenger(fPathWindow).IsValid() == false) {
|
||||
@@ -572,9 +573,7 @@ GeneralInfoView::MouseMoved(BPoint where, uint32, const BMessage* dragMessage)
|
||||
|
||||
if (font.StringWidth(fLinkToStr.String()) > maxWidth) {
|
||||
fTrackingState = no_track;
|
||||
BRect rect(fLinkRect);
|
||||
rect.OffsetBy(Window()->Frame().left,
|
||||
Window()->Frame().top);
|
||||
BRect rect = ConvertToScreen(fLinkRect);
|
||||
|
||||
if (!fLinkWindow
|
||||
|| BMessenger(fLinkWindow).IsValid() == false) {
|
||||
@@ -587,9 +586,7 @@ GeneralInfoView::MouseMoved(BPoint where, uint32, const BMessage* dragMessage)
|
||||
} else if (fDescRect.Contains(point)
|
||||
&& font.StringWidth(fDescStr.String()) > maxWidth) {
|
||||
fTrackingState = no_track;
|
||||
BRect rect(fDescRect);
|
||||
rect.OffsetBy(Window()->Frame().left,
|
||||
Window()->Frame().top);
|
||||
BRect rect = ConvertToScreen(fDescRect);
|
||||
|
||||
if (!fDescWindow
|
||||
|| BMessenger(fDescWindow).IsValid() == false) {
|
||||
|
||||
@@ -129,7 +129,8 @@ BInfoWindow::BInfoWindow(Model* model, int32 group_index,
|
||||
if (TargetModel()->InitCheck() != B_OK)
|
||||
return;
|
||||
|
||||
AddChild(new HeaderView(TargetModel()));
|
||||
fHeaderView = new HeaderView(TargetModel());
|
||||
AddChild(fHeaderView);
|
||||
BTabView* tabView = new BTabView("tabs");
|
||||
tabView->SetBorder(B_NO_BORDER);
|
||||
AddChild(tabView);
|
||||
|
||||
Reference in New Issue
Block a user