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
|
FindPanel.cpp
|
||||||
FSClipboard.cpp
|
FSClipboard.cpp
|
||||||
FSUtils.cpp
|
FSUtils.cpp
|
||||||
|
GeneralInfoView.cpp
|
||||||
InfoWindow.cpp
|
InfoWindow.cpp
|
||||||
LocalizedFolders.h
|
LocalizedFolders.h
|
||||||
Model.cpp
|
Model.cpp
|
||||||
|
|||||||
@@ -188,7 +188,10 @@ GeneralInfoView::GeneralInfoView(Model* model)
|
|||||||
|
|
||||||
// Keep some free space for the stuff we print ourselves
|
// Keep some free space for the stuff we print ourselves
|
||||||
float lineHeight = CurrentFontHeight();
|
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);
|
B_USE_WINDOW_SPACING, B_USE_WINDOW_SPACING);
|
||||||
|
|
||||||
// Add a preferred handler pop-up menu if this item
|
// 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) {
|
if (font.StringWidth(fPathStr.String()) > maxWidth) {
|
||||||
fTrackingState = no_track;
|
fTrackingState = no_track;
|
||||||
BRect rect(fPathRect);
|
BRect rect = ConvertToScreen(fPathRect);
|
||||||
rect.OffsetBy(Window()->Frame().left,
|
|
||||||
Window()->Frame().top);
|
|
||||||
|
|
||||||
if (fPathWindow == NULL
|
if (fPathWindow == NULL
|
||||||
|| BMessenger(fPathWindow).IsValid() == false) {
|
|| BMessenger(fPathWindow).IsValid() == false) {
|
||||||
@@ -572,9 +573,7 @@ GeneralInfoView::MouseMoved(BPoint where, uint32, const BMessage* dragMessage)
|
|||||||
|
|
||||||
if (font.StringWidth(fLinkToStr.String()) > maxWidth) {
|
if (font.StringWidth(fLinkToStr.String()) > maxWidth) {
|
||||||
fTrackingState = no_track;
|
fTrackingState = no_track;
|
||||||
BRect rect(fLinkRect);
|
BRect rect = ConvertToScreen(fLinkRect);
|
||||||
rect.OffsetBy(Window()->Frame().left,
|
|
||||||
Window()->Frame().top);
|
|
||||||
|
|
||||||
if (!fLinkWindow
|
if (!fLinkWindow
|
||||||
|| BMessenger(fLinkWindow).IsValid() == false) {
|
|| BMessenger(fLinkWindow).IsValid() == false) {
|
||||||
@@ -587,9 +586,7 @@ GeneralInfoView::MouseMoved(BPoint where, uint32, const BMessage* dragMessage)
|
|||||||
} else if (fDescRect.Contains(point)
|
} else if (fDescRect.Contains(point)
|
||||||
&& font.StringWidth(fDescStr.String()) > maxWidth) {
|
&& font.StringWidth(fDescStr.String()) > maxWidth) {
|
||||||
fTrackingState = no_track;
|
fTrackingState = no_track;
|
||||||
BRect rect(fDescRect);
|
BRect rect = ConvertToScreen(fDescRect);
|
||||||
rect.OffsetBy(Window()->Frame().left,
|
|
||||||
Window()->Frame().top);
|
|
||||||
|
|
||||||
if (!fDescWindow
|
if (!fDescWindow
|
||||||
|| BMessenger(fDescWindow).IsValid() == false) {
|
|| BMessenger(fDescWindow).IsValid() == false) {
|
||||||
|
|||||||
@@ -129,7 +129,8 @@ BInfoWindow::BInfoWindow(Model* model, int32 group_index,
|
|||||||
if (TargetModel()->InitCheck() != B_OK)
|
if (TargetModel()->InitCheck() != B_OK)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
AddChild(new HeaderView(TargetModel()));
|
fHeaderView = new HeaderView(TargetModel());
|
||||||
|
AddChild(fHeaderView);
|
||||||
BTabView* tabView = new BTabView("tabs");
|
BTabView* tabView = new BTabView("tabs");
|
||||||
tabView->SetBorder(B_NO_BORDER);
|
tabView->SetBorder(B_NO_BORDER);
|
||||||
AddChild(tabView);
|
AddChild(tabView);
|
||||||
|
|||||||
Reference in New Issue
Block a user