View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001456 | Double Commander | Graphical user interface | public | 2016-07-06 21:09 | 2020-11-30 07:44 |
| Reporter | cordylus | Assigned To | Alexx2000 | ||
| Priority | normal | Severity | trivial | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Projection | none | ETA | none | ||
| Product Version | 0.7.3 | ||||
| Target Version | 0.8.0 | Fixed in Version | 0.8.0 | ||
| Summary | 0001456: Не исчезает подсвеченный мышкой каталог в адресной строке | ||||
| Description | 1. При переходе в другой каталог клавиатурой (демонстрация на гифке) 2. Навести, чтобы подсветилось, затем переключиться в другое перекрывающее местоположение мышки окно Alt+Tab-ом, находясь в другом окне увести мышку за границы окна DC, вернуться Alt+Tab-ом в DC, подсвеченный элемент остается висеть, пока мышка не побывает над окном DC снова. | ||||
| Tags | No tags attached. | ||||
| Attached Files | bug1456.patch (2,918 bytes)
Index: src/fileviews/ufileviewheader.pas
===================================================================
--- src/fileviews/ufileviewheader.pas (revision 7570)
+++ src/fileviews/ufileviewheader.pas (working copy)
@@ -134,7 +134,7 @@
procedure TFileViewHeader.PathLabelClick(Sender: TObject);
var
- walkPath, dirNameToSelect: String;
+ walkPath, selectedDir, dirNameToSelect: String;
begin
FFileView.SetFocus;
@@ -142,9 +142,10 @@
begin
// User clicked on a subdirectory of the path.
walkPath := FFileView.CurrentPath;
- FFileView.CurrentPath := FPathLabel.SelectedDir;
+ selectedDir := FPathLabel.SelectedDir;
+ FFileView.CurrentPath := selectedDir;
- while (Length(walkPath) > Length(FPathLabel.SelectedDir) + 1) do
+ while (Length(walkPath) > Length(selectedDir) + 1) do
begin
dirNameToSelect := ExtractFileName(ExcludeTrailingPathDelimiter(walkPath));
walkPath := FFileView.FileSource.GetParentDir(walkPath);
Index: src/upathlabel.pas
===================================================================
--- src/upathlabel.pas (revision 7570)
+++ src/upathlabel.pas (working copy)
@@ -38,6 +38,7 @@
FAllowHighlight: Boolean;
FHighlightStartPos: Integer;
FHighlightText: String;
+ FMousePos: Integer;
{en
How much space to leave between the text and left border.
}
@@ -53,10 +54,12 @@
If a mouse if over some parent directory of the currently displayed path,
it is highlighted, so that user can click on it.
}
- procedure Highlight(MousePosX, MousePosY: Integer);
+ procedure Highlight;
protected
+ procedure TextChanged; override;
+
procedure MouseEnter; override;
procedure MouseMove(Shift: TShiftState; X,Y: Integer); override;
procedure MouseLeave; override;
@@ -138,7 +141,7 @@
end;
end;
-procedure TPathLabel.Highlight(MousePosX, MousePosY: Integer);
+procedure TPathLabel.Highlight;
var
PartText: String;
StartPos, CurPos: Integer;
@@ -170,7 +173,7 @@
PartWidth := Canvas.TextWidth(PartText);
// If mouse is over this part of the path - highlight it.
- if InRange(MousePosX, CurrentHighlightPos, CurrentHighlightPos + PartWidth) then
+ if InRange(FMousePos, CurrentHighlightPos, CurrentHighlightPos + PartWidth) then
begin
NewHighlightPos := CurrentHighlightPos;
Break;
@@ -210,6 +213,12 @@
end;
end;
+procedure TPathLabel.TextChanged;
+begin
+ inherited TextChanged;
+ if FAllowHighlight and MouseEntered then Highlight;
+end;
+
procedure TPathLabel.MouseEnter;
begin
inherited MouseEnter;
@@ -223,7 +232,8 @@
procedure TPathLabel.MouseMove(Shift: TShiftState; X,Y: Integer);
begin
inherited MouseMove(Shift, X, Y);
- if FAllowHighlight then Highlight(X, Y);
+ FMousePos := X;
+ if FAllowHighlight then Highlight;
end;
procedure TPathLabel.MouseLeave;
| ||||
| Fixed in Revision | 7656 | ||||
| Operating system | |||||
| Widgetset | |||||
| Architecture | |||||
|
|
Описанная в п.2 проблема наблюдается и на кнопках, они остаются подсвеченными, несколько секунд даже остается висеть всплывающая подсказка. Не обязательно переключать окна, достаточно резко выдернуть мышку с подсвеченного элемента за пределы окна, чтобы не сработал MouseMove на другом элементе формы. А когда кнопка прижата вплотную к краю (нижний ряд кнопок при развернутом на весь экран DC) - даже выдёргивать не нужно, достаточно просто вывести мышь с подсвеченного элемента за окно (перевести на панель задач). Это проблема Lazarus, он не посылает MouseLeave при покидании окна мышью? |
|
|
Проблема из п.2 - баг Lazarus https://bugs.freepascal.org/view.php?id=31510 под Windows уже исправлен, https://bugs.freepascal.org/view.php?id=31511 под GTK - пока нет. |
|
|
Патч для решения п.1 |
|
|
Так как п.2 баг Lazarus, то его в контексте DC можно считать закрытым. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2016-07-06 21:09 | cordylus | New Issue | |
| 2016-07-06 21:09 | cordylus | File Added: bug.gif | |
| 2016-12-28 13:15 | cordylus | Note Added: 0002040 | |
| 2017-05-23 05:09 | cordylus | Note Added: 0002249 | |
| 2017-05-23 08:05 | cordylus | File Added: bug1456.patch | |
| 2017-05-23 08:07 | cordylus | Note Added: 0002250 | |
| 2017-06-12 11:02 | Alexx2000 | Status | new => acknowledged |
| 2017-06-12 11:02 | Alexx2000 | Target Version | => 0.8.0 |
| 2017-06-27 19:23 | Alexx2000 | Fixed in Revision | => 7656 |
| 2017-08-20 12:03 | Alexx2000 | Note Added: 0002331 | |
| 2017-08-20 12:03 | Alexx2000 | Status | acknowledged => resolved |
| 2017-08-20 12:03 | Alexx2000 | Fixed in Version | => 0.8.0 |
| 2017-08-20 12:03 | Alexx2000 | Resolution | open => fixed |
| 2017-08-20 12:03 | Alexx2000 | Assigned To | => Alexx2000 |
| 2020-11-30 07:44 | Alexx2000 | Status | resolved => closed |