Commit Graph
100 Commits
Author SHA1 Message Date
John Scipione 142022d4c8 Appearance & Terminal: Cleanup cruft and fix minor style issues.
Change-Id: I1b1d50763f2058870d5cfd1600f6f67f0b4733f5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9778
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-11-11 17:03:00 +00:00
John Scipione 8c7f77a0b2 Tracker: Limit hit rect to the icon and label in icon mode
(and mini-icon mode).

This fixes a regression from R1B5 allowing you to click on the blank
area to the left or right of the icon of a file with a long filename
to select it. You once again have to click on either the icon or the
label to select the file.

Fixes #19753

Change-Id: Iae8b7c4561f2bfdda1361d4bbee4e87ecde2bb06
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9745
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2025-10-30 03:51:10 +00:00
John Scipione a6432a2ba0 Tracker: FilePanel Redirect file panel delete shortcuts to pose view.
Fixes #19717

Change-Id: If53505fc83be09c2fca9b03cd582bfc75f58765b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9608
Reviewed-by: waddlesplash <[email protected]>
Reviewed-by: John Scipione <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-10-27 18:31:23 +00:00
John Scipione b5f002d66f Tracker: Add "Edit query" and "Close all in workspace" to Query window
Fixes #19759

Change-Id: I547e38c46c2f9abf369a0278b433fa01ac911477
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9666
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-10-27 18:24:26 +00:00
John Scipione 17a87a2077 Tracker: Add Disks to Desktop nav menu if "Show Disks" setting is on.
Rename AddRootItemsIfNeeded() to AddVolumeItems().

Fixes #19720

Change-Id: I866b7364012b2d267809d9f49059ef531ec4a24f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9741
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: humdinger humdinger <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-10-27 16:28:45 +00:00
John Scipione a20098f186 libsolv: Define HAVE_STRCHRNUL on darwin
src/libs/libsolv/solv/repodata.c:246:27: error: static declaration of
'strchrnul' follows non-static declaration
  246 | static inline const char *strchrnul(const char *str, char x)

Change-Id: I4a93b1c361ba32d3984567ca24bd1d473a252555
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9740
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-10-27 15:33:41 +00:00
John Scipione 82fb83956a BSlider: Set text to panel colors. Fixes #19700
Change-Id: If5b16052a093dbd19c0e85b53d604ed36903710e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9581
Reviewed-by: nephele nephele <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-08-06 22:13:18 +00:00
John Scipione 7061f99814 Tracker: Rebuild add-on menus using node monitoring in fewer cases.
Change-Id: I5825a94cab14feb509e96c7d0c85848abf28cb37
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9073
Reviewed-by: waddlesplash <[email protected]>
2025-08-05 15:57:19 +00:00
John Scipione 2ff08f46cb Tracker: Replace an instance of static_cast with dynamic_cast
No fundamental change here, Tracker might be used as a kit and
this will fail as be_app is not Tracker.

Change-Id: I1e2d8e143e996c008cd03771d34f20198d8109c8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9577
Reviewed-by: waddlesplash <[email protected]>
2025-08-03 22:50:43 +00:00
John Scipione e32d782cb4 Tracker: Allow draggable container icon on Root, Trash and Printers
Use new DraggableContainerIcon name when invalidating icon.

Create a ShouldHaveDraggableFolderIcon() method on BContainerWindow
to consolidate the gating logic to a method.

We alert if you try and copy, move or create link to any of these
directories, however you may drag the icon in some instances such as
to change the directory in a file panel or to open the directory up
in FileTypes. You may create a link to the printers directory.

Set the Printer icon on the printers directory.

Fixes #3385

Tracker: Disks menu in CountView

* Open Disks directory on click.
* Skip volumes with no capacity (e.g. system, config) from
  Root and Desktop menus (still shown in Home and volumes though).
* No Trash on volumes, add only to Desktop.
* Declare some variables outside loop.
* Rename originatingWindow to source.

Fixes #3549

Change-Id: I66318d2485a5a8405f5459c355a467f34e19ecc5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9499
Reviewed-by: John Scipione <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-07-30 04:07:05 +00:00
John Scipione f1cc4cf8cb Tracker: Truncate name better in icon mode, don't draw outside.
The max width of the file name was getting set by the width of the
name column, even in icon mode. Use an arbitrary max width of 30em
for the name field in icon (and mini-icon) mode instead.

Set fValueIsDefined on name and other attributes.

Do not attempt to truncate name if !fValueIsDefined, this means
that the value is "-" to show that it is undefined. We assume this
should fit and there is no way to truncate the value.

If the value is later defined it is marked fDirty to truncate it
to the available space.

Fixes #19431

Change-Id: I4cb7953bc746039600ee578b4fa6b786c802bdf8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9516
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: John Scipione <[email protected]>
2025-07-30 04:02:39 +00:00
John Scipione 08bdab7600 Tracker: Fix remaining drawing artifacts, last part of #18826
Change-Id: I9483d67bfb98207e1cde726aaa00df6031933f3c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9496
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: John Scipione <[email protected]>
2025-07-30 04:02:39 +00:00
John Scipione 64334a1580 Tracker: Redraw Trash icon when pose attribute updates.
* Don't set Trash icon in FSGetTrashDir anymore, do it in TrashWatcher.
* Write vector icon to attr or large/mini icon attrs, but not both.
* Only update Trash icon attribute on boot volume, not the hidden trash
  folder on other volumes.
* Monitor Trash icon attribute changes by TrashWatcher in BPoseView.
* Get rid of ShouldUseWellKnownIcon(), update ResetIconFrom().
* Remove model param from BPose::UpdateWidgetAndModel() and always use
  the ResolvedModel() of the pose instead.
* Pass poseLoc into BPose::UpdateWidgetAndModel() in icon-mode.
* Workaround for GetAttrInfo() failing to update removed icon attrs.
* Check fNode not NULL in Model::StatChanged() to prevent crash when
  unmounting volumes with trashed items.
* Filter out 0 capacity volumes checking for Trash directory.

Fixes #8696

Change-Id: Ief2efc07c85866cc0e49468c668e47ec90b855af
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9458
Reviewed-by: waddlesplash <[email protected]>
Reviewed-by: John Scipione <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-07-30 04:00:12 +00:00
John Scipione d4b0e30b56 Tracker: Write Desktop vector icon attr or large/mini icon attrs
... but not both.

Change-Id: I4bb38e011dcef0e6bbc092c9acf6a826bd867d30
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9477
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: John Scipione <[email protected]>
Reviewed-by: nephele nephele <[email protected]>
2025-07-30 04:00:12 +00:00
John Scipione 091cc6357e Tracker: Set location in BPoseView::UpdateIcon() for icon-mode.
Change-Id: I8d4fea5eea7a19daedd31bd81cd59270a2b56720
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9476
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-07-30 04:00:12 +00:00
John Scipione 43db356db7 Tracker: GetInt32() instead of FindInt32() when getting opcode
FindInt32() works in this case but is deprecated.

No functional change intended.

From the BeBook BMessage page:
"Several functions, such as FindRect() and FindInt32(), have versions
that return the found value directly. These versions don't report errors
and may not be supported in the future."

Change-Id: Ida979153dd00e247c2174edd73d0019752b388f8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9079
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-07-28 21:26:42 +00:00
John Scipione 448e39f9c3 Tracker: Fix esc to cancel type-ahead filtering in file panels
... by redirecting message to the PoseView. Filter out lock modifiers.

Fixes #13151

Change-Id: I0a17334aeb3b04b6271dec47e58aa4933ec6a0a5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9525
Reviewed-by: John Scipione <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-07-28 12:34:49 +00:00
John Scipione f5dffd5ca3 Tracker: Filter out lock modifiers on Open with window
Change-Id: I73bd38b3596a9f9d5793df4bd11f32c62d6e7eff
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9524
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: John Scipione <[email protected]>
2025-07-28 12:34:49 +00:00
John Scipione abc4a28949 Tracker: File panel misc style fixes
Change-Id: I6376e52d26ac05e0f591c2484a7c7301cee6166b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9523
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: John Scipione <[email protected]>
2025-07-28 12:34:49 +00:00
John Scipione 24f4871106 BWindow: fix Quit shortcut, uppercase the inputted key
Change-Id: Ic6c80fc0cce033bcffcd7f0934a9ecf7f6825c00
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9521
Reviewed-by: X512 X512 <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-07-26 17:37:59 +00:00
John Scipione f21782699a Tracker: Show mounted volumes on Desktop in file panels again
Add switch to Desktop and Home shortcuts. Fixes #15148
Show Volumes or Disks on Desktop in file panel. Fixes #19547

Rename Add/RemoveRootPoses() to Add/RemoveVolumePoses().
Use default Tracker values when adapting to setting changes.

Bring ShowVolumes() into BPoseView and apply the same logic
used by file panel to DesktopPoseView to switch between Disks
and volumes on Desktop.

Add Disks or volumes to file panel in BPoseView instead.

When you set Show Disks or Show Volumes, set the other as well,
they are opposites of each other.

Remove unnecessary params related to adding/removing volumes.

Rename ShowVolumes() to ToggleDisksVolumes() and move to BPoseView.
Create IsVolumesRoot() to identify Desktop in a file panel.

Change-Id: Id250aa6cf7386c7988017a9edbdb16ec9cea00ba
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9503
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2025-07-23 23:05:51 +00:00
John Scipione c16a8cad1a Storage Kit: Add support for FAT16 type
Change-Id: I626550b83179e5ad429ed7b8ebc6b8d320446cbe
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8959
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2025-07-21 10:46:06 +00:00
John Scipione b58c23c7c6 Menu docs: fix typo
Change-Id: Icc789b5d2652dca3a64c3bbc5572821747efa75d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9438
Reviewed-by: waddlesplash <[email protected]>
2025-07-02 19:12:03 +00:00
John Scipione e362f604f4 Revert Interface Kit: BWindow owns (and deletes) menu sem and friends
This reverts commits:
39083dd0f7
0f430ba35c
ac55439364

Fixes #19553

Change-Id: I40f9a694079d4376221099e1d1b99208aeb207b7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9416
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-06-30 17:43:51 +00:00
John Scipione b515400884 BButton: Document AdoptSystemColors() and HasSystemColors() in the Haiku Book.
Change-Id: Ibe72cc796738e90beee9388eaba95342ab48640d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8898
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-06-30 14:57:07 +00:00
John Scipione 15c87be3ea ColorListView: Handle color dropped on unselected
Remove shared message handling from ColorListView,
you are expected to implement this yourself and these
message constants were not actually being used by
the message target.

Do color drop handling in Appearance and Terminal.
Handle all color drops in WasDropped().

Allow current selection to remain, only update color.
TODO Changing selection on external drops should be
fixed in BListView. Work-around in BColorListView.

Fixes #19562

Change-Id: Ic99bbb1288fd736778eac831d38e453122815abc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9296
Reviewed-by: John Scipione <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-06-30 14:56:42 +00:00
John Scipione 0d91cd6464 Tracker: Add Paste item to volume window context menu
Change-Id: Iaa8b992011510364cf1eb9a3f0e6a6e749eefe5f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8955
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: John Scipione <[email protected]>
2025-06-30 14:55:52 +00:00
John Scipione 76f3ceaadc Deskbar: Reduce window height by 1 in mini-mode
Adjust tray icons and clock to fit accordingly. Leaf menu height is
reduced by 1 in vertical mode to match.

This makes the overlap of maximized windows and Deskbar less noticeable,
especially in horizontal mini-mode.

Fixes #16231

Change-Id: I622d008ee093e018ebcb46e3c45647577f46184f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8833
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: John Scipione <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
2025-06-30 14:54:49 +00:00
John Scipione bcea01a853 Tracker: Fix Select shortcut again Fixes #19596
Change-Id: I0652ee11bb66e9b0ce9eaef8f9d7dc4f6975641e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9320
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-06-01 03:09:31 +00:00
John Scipione 60bb9a9f96 BControl docs: Sum up abstract nature of BControl and how to set colors.
Change-Id: I509e5325a8fcfdc3bf75ba3e35c887c93099d3c5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8980
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: nephele nephele <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-05-26 20:08:52 +00:00
John Scipione cb4a168e37 Tracker: menu parameter is ambiguous, rename to parent instead
Change-Id: I9a8811ff8c142efcdfbebae0c2b6e438290eafcd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9061
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-03-04 14:50:27 +00:00
John Scipione 39083dd0f7 BMenu: Fix infinite loop regression on right-click drag
... wait while B_INTERRUPTED instead of != B_BAD_SEM_ID.

Change-Id: I58f81762bddec1e7f4b01e2b7806c395632ba992
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9028
Reviewed-by: waddlesplash <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
2025-02-22 05:29:57 +00:00
John Scipione d6c5aee9f9 Tracker: Draw all columns, fixes bug invalidating off-screen columns
AFAIK this has always been this way, however, the confusion seems to
be that pose->CalcRect() takes false for minimal rect while pose->Draw()
takes true for full-draw so they are opposites of each other.

This means we draw all columns on Invalidate(), not just the first one.

Change-Id: I40ddf5fa75b46d6da987fd5d5f83cdc4782fa851
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9019
Reviewed-by: waddlesplash <[email protected]>
2025-02-19 22:05:05 +00:00
John Scipione 6848bca37f Tracker: Raise opacity of dragged and cut items, fixes #19429
Change-Id: If498bb79a55697b2c270f3f21383d3c4f3a3d567
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9014
Reviewed-by: waddlesplash <[email protected]>
2025-02-19 22:05:05 +00:00
John Scipione 40bb2f8c9f Tracker: Make drag fade rect a bit bigger and compose it
Change-Id: I2bfa9b5416cced7627f87613180c6b7c192be0d2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9013
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-02-19 22:05:05 +00:00
John Scipione c24d316399 Tracker: Gray text on selected items in inactive windows, fixes #19428
Change-Id: If73faba3682c5360a15e4e87983d8c377216cb5b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9017
Reviewed-by: waddlesplash <[email protected]>
2025-02-19 22:05:05 +00:00
John Scipione 82c55a447b Tracker: Use drawView instead of view in one place
Change-Id: I8ae87ca92c0749ce41bc11d1d59dcbcf38d9f25e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9016
Reviewed-by: John Scipione <[email protected]>
2025-02-19 22:05:05 +00:00
John Scipione 0f430ba35c BMenu: Revert a small piece of hrev58661
Do not _Uninstall() whenever we _Hide() in BMenu again.

Fixes menus in Terminal and elsewhere.

Change-Id: Ic89ee2e4b0a94cc11c7a4091d9ce01e6ff6bb915
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9018
Reviewed-by: waddlesplash <[email protected]>
2025-02-19 20:07:55 +00:00
John Scipione ac55439364 Interface Kit: BWindow owns (and deletes) menu sem
_Uninstall() before _Hide() in BMenu because the window must
be available when we _Uninstall() especially for shortcuts.

Remove #define and always assume USE_CACHED_MENUWINDOW.

_Uninstall() whenever we _Hide() in BMenu.

Change-Id: I5dae85f6edf1f0b4ccf67a6d9d77470576671cee
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9012
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-02-19 17:28:00 +00:00
John Scipione adc74a927c Tracker: Take precautions against rounded invert rect, fixes #18826
Change-Id: Ic4a33b960d8be6c5242d66f21aae2e0184c5cbc8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8976
Reviewed-by: John Scipione <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-02-19 08:02:08 +00:00
John Scipione fbe7c9072c Tracker: Update pose/text widget to fix some problems
* Remove the unused width param from TextWidget::Draw(), we don't need it.
* Simplify UpdateIcon() with new _ListIconRect() and _IconRect() methods.
* Remove bad drawView->SetDrawingMode(B_OP_OVER) from TextWidget:Draw().
* Set cut and dragged item text based on high color instead of low color
  initially, then switch to low color when drawing text widget since the
  low color has been set.
* Restore cut item and dragged item high color after drawing outline.
* Fix regression in list view drawing dragged item label.
* Use correct CurrentPoseList() in list mode and icon mode.
* Always break when encountering NULL pose, don't bother to continue.
* Invalidate instead of redrawing on Select all.
* Split Extent() into ListModeExtent() and IconModeExtent().
* Init fListElemHeight and fListOffset in the initilizer list
* Init sFontHeight in earlier in InitCommon().
* Rename resultingIndex to resultIndex to make it fit on one line.
* Update pose and text widget CalcRect() to position everything
  (it basically already was but this standardizes ceilf and floorf).
* (use / 2.f to avoid trunction, just in case)

Change-Id: Idc8ccffdbe000bb126ab195e9739e7e5b9392bb3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8971
Reviewed-by: John Scipione <[email protected]>
2025-02-19 08:02:08 +00:00
John Scipione cd461bd05c BColumnListView: push/pop state to restore colors after column resize
Change-Id: Ic6d6d96a3a401051ca399cf853c3d800afe6d3fe
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8970
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: John Scipione <[email protected]>
2025-02-19 08:02:08 +00:00
John Scipione 13d645a0fe Tracker: Set read-only low color on ColumnResize()
Change-Id: I6344d7e3e6363da068b8b5ede818c01070c7484c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8998
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-02-18 21:13:51 +00:00
John Scipione 046f27c114 Tracker: Prevent Add-ons from being rebuilt too fast, fixes #19426
Change-Id: I016aa63979c9e4b3a28d486538e98df8cd2e2fa9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9007
Reviewed-by: waddlesplash <[email protected]>
2025-02-18 21:13:40 +00:00
John Scipione 759dfd5ae3 Tracker: invert inactive select color so it is how it was
Change-Id: I5d79fc733496746bceb7003cb7d8a70555d87732
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8972
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-02-13 02:02:59 +00:00
John Scipione c78383f720 Tracker: Populate Tracker add-ons into main menu bar
This is used by some Tracker add-ons including TrackRunner and TrackGit.

Fixes #19386

Change-Id: I329eb9f1f8b2abf2872593d8f4417fa82de0b521
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8911
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
2025-02-11 03:59:26 +00:00
John Scipione 3953c0e7cd Tracker: Fix list icon click regression, Fixes #19414
Change-Id: I96d8995087bf8621ff580ad3b4ed54ae59786e32
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8964
Haiku-Format: Haiku-format Bot <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-02-10 20:16:08 +00:00
John Scipione 7d6ff0554b Tracker: Fix one more artifact drawing issue
... related to Pose and TextWidget not exactly matching.

Change-Id: Ic9c3f2ecc9a9dc4af4c200bc5a16b9f46d72f9b1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8954
Reviewed-by: waddlesplash <[email protected]>
2025-02-09 03:02:07 +00:00
John Scipione c368793cd4 Tracker: Fixup drop context move to enabled status
regression from hrev58560.

Change-Id: Ic62292c2eb38e486cf18f0e4e9535ff6154b0c87
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8953
Reviewed-by: waddlesplash <[email protected]>
2025-02-09 03:02:07 +00:00
John Scipione 2cf974a04e Tracker: Do not create symbolic link on same folder
Fixes #19403

Change-Id: Ib590822308b819d60715139c536d60e4e14c510f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8950
Reviewed-by: waddlesplash <[email protected]>
2025-02-08 22:37:07 +00:00
John Scipione 475412d382 Tracker: Fix minor underline issue from hrev58610
Change-Id: I80098f8bb10ab5eb1b8c39b5acb698ea0163bd85
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8949
Reviewed-by: waddlesplash <[email protected]>
2025-02-08 22:37:07 +00:00
John Scipione 0464dc83d9 BMenuItem: Fix Alt+1 to switch to icon mode in Tracker
... by setting the incoming shortcut instead of the old one
in BMenuItem::SetShortcut().

Fixes #19405 a regression hrev58611.

Change-Id: Iecf19a323f6b6ead288e3f1ef1169376b11cddb3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8948
Reviewed-by: waddlesplash <[email protected]>
2025-02-08 22:37:07 +00:00
John Scipione e4ef7b6075 Tracker: Redirect B_DELETE to BTextView if focused on one
Fixes #19404 a regression from hrev58560.

Change-Id: Iea6df69e04f5dccb8f91be506b5b7f85686c5eb1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8947
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Axel Dörfler <[email protected]>
2025-02-08 22:02:29 +00:00
John Scipione a502215d78 BPopUpMenu: Adds Alt back to pop up windows
... by calling Install() on Go() in BPopUpMenu.

Install() prepares item shortcuts and set missing targets to the
target window. Combined with hrev58611 for regular menus this
passes most of the shortcut prep work on to BWindow.

Fixes pop up portion of #19395 a regression from hrev58589.

Change-Id: I8a1615502e0d6e0b75f9cd3ca2a45d08b53d11ce
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8946
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: John Scipione <[email protected]>
2025-02-08 17:59:44 +00:00
John Scipione f28ee3ec24 BPopUpMenu: style updates, update copyright year to 2025
... and style fixes. Add myself as author.

Change-Id: I213ba5e1dabf1cf15db86c307fb3484231947332
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8945
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Axel Dörfler <[email protected]>
2025-02-08 16:08:30 +00:00
John Scipione 5ee786c31f Interface Kit: Fix missing Alt key in menu shortcuts
The shortcut detection was working, just not the display of the
modifiers in the menu. I've added back the necessary code to fix
this in BMenuItem.

BWindow does the heavy lifting of preparing the keys and
modifiers. I have changes _FindShortcut() used by BMenuItem to
send the prepared modifiers back to BMenuItem.

Set the parameters raw in the constructor, they will get fixed
up in Install().

I also make sure to use the prepped version of the key and mods
in BWindow::AddShortcut() to remove the old one. This is a minor
update that eliminates an edge failure case of malformed input.

Fixes #19395 a regression from hrev58589.

Change-Id: I4333f89149ff843f92dbffbd53d58ffc2def6760
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8943
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: John Scipione <[email protected]>
2025-02-07 17:00:56 +00:00
John Scipione 2c7072f33c Tracker: Fix label redraw issues in mini-icon mode
... and center label vertically.

Fixes #18826

Change-Id: If96ce2089cbf8345d147d39b091317168bcf5c1a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8886
Reviewed-by: waddlesplash <[email protected]>
Reviewed-by: John Scipione <[email protected]>
2025-02-06 22:08:11 +00:00
John Scipione 3527a0ee23 Tracker: Fix garbled text when dragging cut poses
* Determine whether we're currently dragging by looking at the
  current window message what, dragging replaces direct in a few
  places especially crucial to drawing semi-transparent dragged
  items correctly.
* Export kMsgMouseDragged and kMsgMouseLongDown to the BPoseView
  header to check for dragging (but still in BPrivate).
* Turn on outline label drawing for dragged items and remove TODO.

Fixes #6461

Change-Id: I45cd401299dec408b76cb4b9ce1e9350ed59ef5b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8842
Reviewed-by: waddlesplash <[email protected]>
2025-02-06 22:08:11 +00:00
John Scipione 44d74ab075 Tracker: Refactor BPoseView and BPose drawing
* Create a DrawTextWidget() method in BPose to share drawing
  between list and icon modes.
* Remove direct param from BPose::DrawIcon() and remove the state
  changes from that method.
* Remove direct parameter from TextWidget::Draw(), we can calc it.
* Refactor BPose::Draw() to set the LowColor() only. This is now
  considerably more simple to read and understand.
* Refactor ColumnRedraw() to reset colors and drawing mode.
* Many explanatory comments added.

* Remove BackColor() and TextColor(), use LowColor() and HighColor().
* Use AdoptSystemColors() and HasSystemColors() to set colors.
  These are virtual in BPoseView and the colros are overridden by
  DesktopPoseView, OpenWithPoseView and QueryPoseView.
* Add ReadOnlyTint() version to Utilities that takes a color_which.
* Rename InvertedBackColor() to InvertColorSmart().
* Force Edit name select box background color to be black/or white
  depending on the inverse of your background color on Desktop
  instead of using document colors.
* Determine if volume is read-only by pose instead of its parent,
  this fixes a bug where read-only volumes mounted on a read-write
  directory like the Desktop had an editable name even though they
  were not supposed to. It wouldn't let you change the name though.

* Remove fIsDesktop param from BPoseView, use only IsDesktopView()
  now except in FilePanelPoseView when navigating to the Desktop.
* Update BContainerWindow, DesktopPoseView and FilePanelPoseView
  to adjust to this change. IsDesktopView() is always true for
  DesktopPoseView, never true otherwise.
* DesktopPoseView disambiguated further from BPoseView. Add a few
  virtual override methods.
* Custom Brightness() value on DesktopPoseView based on the default
  Desktop color.
* Respond to B_WORKSPACE_ACTIVATED and B_RESTORE_BACKGROUND_IMAGE
  messages to update the Desktop text color.

Change-Id: I122dbeab668244772012656a59cbba3050245f44
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8885
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-02-06 22:08:11 +00:00
John Scipione 0ed8ac17f2 Tracker: Do not start editing file name while dragging
Change-Id: Ibf215fb2dd1ed2cac56c0db47fab788f8b99646f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8867
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-02-06 22:08:11 +00:00
John Scipione c24ebeeacf Tracker: Code simplifications related to dragging
Pass buttons into DragSelectedPoses instead of calling GetMouse(),
and bail out if a mouse button is not down.

Eliminate HeaderView::fMouseDown, get buttons from CurrentMessage()
instead. Reduce icon_track indent by breaking early on invalid.

Add B_WILL_DRAW flag to bitmap drawing view.

Refactor BPoseView::MakeDragBitmap().

Move DragStart(), DragEnd(), Dragging(), (now IsDragging())
DragMessage() and related method parameters from BContainerWindow
to BPoseView. This avoids having to dynamic_cast to get the window
from the pose view.

Put bool params at the bottom of the BPoseView class with width 1
to facilitate packing.

Remove buttons parameter from WasDoubleClick() and get from
Window()->CurrentMessage() instead (along with clicks).

Change-Id: I94b345e44af7b1136f94ded02e9c2a118188a877
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8841
Reviewed-by: waddlesplash <[email protected]>
2025-02-06 22:08:11 +00:00
John Scipione 0f3d21e82d Tracker: Style fixes related to dragging
Change-Id: I540263aeb58710a1c1a2747a9d5784614a5fd791
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8882
Reviewed-by: waddlesplash <[email protected]>
2025-02-06 22:08:11 +00:00
John Scipione 49d3b2a142 Tracker: Fixup hardcoded values for ModelMenuItem padding
This is to make BMenuBar and BMenu margins the same.

The hardcoded menu item margin numbers come from this math on what the
BMenu and BMenuBar item margins respectively used to be a long time ago:
14 - 8 = 6 // for left margin
(14 + 20) - (8 + 8) = 18 // for left + right margin

We have since updated these margins so they need to be recalculated.
Use BPrivate::MenuPrivate to get the new margin deltas.

IconMenuItem and ModelMenuItem classes are used by Tracker add-ons and
those can be in the menu bar as well.

Change-Id: Ie4147c31e6b19764cb36b9c414f7e91c47b7d9bd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8905
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2025-02-05 16:38:08 +00:00
John Scipione def8a585fa BuildSetup: ld on darwin does not support --no-as-needed
Change-Id: I2f5ada95d5f8b346374aebc3a1a8114f345cb29f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8906
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-02-04 17:27:04 +00:00
John Scipione 5610706bb6 BMenuItem: Remove _DrawFunctionChar() cruft added in hrev58589
Change-Id: I7fbc1dc194be91705646f6e822d03e9773bd649a
2025-02-03 02:39:27 -05:00
John Scipione 16c6cc4418 BTextView: Fixup AdoptSystemColors() and HasSystemColors()
Replace private _UsesSystemColors() with public HasSystemColors()
and make sure to consider the tints when checking if system colors
are used or not.

Document HasSytemColors() in the Haiku Book.

Change-Id: I78de4904d5ddb24b98ad27eb93d4e5ccb330d76a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8897
Haiku-Format: Haiku-format Bot <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-02-03 00:14:52 +00:00
John Scipione 74ef92bc55 BTextView: Update word-wise/line-wise shortcuts
... and set alternates. This is updated because we can now set
shortcuts without B_COMMAND_KEY. Setup Alt for Win/Linux mode.

* Word-wise shortcuts Option+arrows.
* Line-wise shortcuts Alt+arrows AND Ctrl+arrows for
  Win/Linux mode and for when there's a conflict.

Otherwise these shortcuts are not expected to conflict.

Add shortcuts for Alt+Backspace and Alt+Delete to delete to
the beginning or end of line instead of word.

Split out vertical and horizontal shortcuts so that if one is
used by an app we at least get the other one.

Fixes #9913

Change-Id: I0124fec7df4585a70ded8d3e7bf2aa8cb4acecb4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7289
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: John Scipione <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
2025-02-02 19:18:35 +00:00
John Scipione 58339b6be4 Tracker: Change "Move to Trash" shortcut to plain DEL
... without Command. Shift+B_DELETE to skip Trash.

Change-Id: Ibd334b62154f488b91d1e0aaf287f478724f38a1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7178
Reviewed-by: nephele nephele <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: John Scipione <[email protected]>
2025-02-02 19:18:35 +00:00
John Scipione 540ae21864 MediaPlayer: Delete playlist items use plain old delete
... fixing a TODO now that #7078 is fixed.

There are 2 remove playlist actions: 'Remove' and 'Move file to Trash'

* 'Remove' playlist shortcut: Cmd+Delete => Delete
  (This also works from the main window to remove the file you're
   currently focused on/listening to from the playlist.)
* 'Remove file from playlist' shortcut has been removed. We have
  decided not to Trash files from MediaPlayer's playlist anymore,
  you'll have to trash the files from a regular Tracker window.

The 'Remove' shortcut gets plain old delete as the author intended.

Change-Id: I3b1e19405e029d9c5f398cfd7a8dbab49fb21fc7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7292
Tested-by: Commit checker robot <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: nephele nephele <[email protected]>
Reviewed-by: John Scipione <[email protected]>
2025-02-02 19:18:35 +00:00
1e2091ced5 Interface Kit: Add support for shortcuts w/o Command
Introduce B_NO_COMMAND_KEY modifier that is used when a
shortcut has no Command modifier, otherwise B_COMMAND_KEY
modifier is added.

This is conceptually different from B_NO_MODIFIERS in that it
allows other modifiers such as B_CONTROL_KEY, B_SHIFT_KEY and
B_OPTION_KEY to be added to a shortcut, but not B_COMMAND_KEY.

This option is required to remove B_COMMAND_KEY because the
Command modifier is assumed to be present on all shortcuts.
This allows us to break this assumption without breaking apps
written before this change and assume B_COMMAND_KEY to be
present even if it has not been explictly added.

Document B_NO_COMMAND_KEY in BMenuItem and BWindow docs.

Fixes #7078

Co-authored-by: X512 <[email protected]>
Co-authored-by: Ryan Leavengood <[email protected]>

Change-Id: If0e20cd848112898f4425ede8c17231dc50deb8a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7293
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: nephele nephele <[email protected]>
2025-02-02 19:18:35 +00:00
John Scipione 69970cdd5b Tracker: Open file location on double click from Query fix
Regression from hrev58560.

Originally: `be_app->PostMessage(&message);`
In hrev58560 it was changed to: `Window()->PostMessage(&message);`
Now: `BMessenger(kTrackerSignature).SendMessage(&message);`

The distinction between original and now is for if Tracker is being
used as a kit, in practice this shouldn't make a difference.

hrev58560 was not correct though.

Fixes #19381

Change-Id: Ia48a8adcf2c9853e8309266369ccf7452c20a679
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8890
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-02-01 21:36:11 +00:00
John Scipione 56dce2b3d4 Tracker: Insert "Mount >" menu at the right location
Fixes #19388 a regression from hrev58560

Change-Id: Iec03b278aa88c5e544962130c6942c5497598b67
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8884
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-01-30 05:06:48 +00:00
John Scipione bd2d95cf90 InterfaceDefs: Reorder enums in ascending order, show gaps
Change-Id: I926d0f02e74ea97c302bc4d1794819b60be2874b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8864
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-01-27 17:19:49 +00:00
John Scipione 4624f9f260 Tracker: Add Cut/Copy/Paste items to context menus
Remove CUT_COPY_PASTE_IN_CONTEXT_MENU define entirely.

Change-Id: I457ee140c2bde7e5ab750528b3196adfe9eb7018
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6358
Reviewed-by: John Scipione <[email protected]>
2025-01-26 18:29:22 +00:00
John Scipione 683100d673 Tracker: Live updating shiftable menu items
Live updating menu classes listen for B_MODIFIERS_CHANGED
messages and update the item label and shortcut on Shift
or Control.

-- File --
Create link => Create relative link
Move to Trash => Delete
Cut => Cut more
Copy => Copy more
Paste => Paste links
Identify => Force identify

-- Window --
Close => Close all
Open parent enable/disable on Control to open root window

-- Window => Arrange by/Desktop --
Clean up => Clean up all

Create TLiveMenu and TLivePopUpMenu classes that inherit from
BMenu and BPopUpMenu respectively.

Create TLiveFileMenu, TLivePosePopUpMenu, TLiveWindowMenu and
TLiveWindowPopUpMenu subclasses for the File and Window menu
and context menus respectively.

Create TLiveMixin to share methods between menus. Pass in parent
window and use window shortcuts to enable/disable "Open parent".

Change-Id: I5dfbd4d468fad02894f1f31aa08d1abf630a4b5d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2293
Reviewed-by: John Scipione <[email protected]>
2025-01-26 18:29:22 +00:00
John Scipione 5b1284db40 BMenu: Inform parent menu when modifier keys change
BMenuWindow: Move submenus over recursively if layout changes.

Fixes #15782

Change-Id: I70e67c3514a3b850f5b5893170b9a34a9176363e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2324
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: John Scipione <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-01-26 18:29:22 +00:00
John Scipione bc61d0aef5 Tracker: Show Open parent menu item on Trash
Change-Id: I754f1457db76f0c3511e4c8d4bf9b236591ccbe2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8703
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: John Scipione <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-01-26 18:29:22 +00:00
John Scipione 9df392ba32 Tracker: Treat root (aka Disks) like a volume
This yields the volume context menu on the Disks icon. Grab root
(Disks) icon before getting volume icon so Disks doesn't get the
generic volume icon. Don't add free space bar to Disks.

Add Mount menu to the Disks File menu and context menu. Mount
settings option has been removed as you can get to it from inside
the Mount menu instead.

SetupMountMenu() method is used to insert the Mount menu similar
to SetupOpenWith() and SetupNavMenus(). Add DetachMountMenu()
convenience method.

Fixes #5584

Change-Id: Ic9e272807a0a36b89cba7258b9937b09b2da32dc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7151
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: John Scipione <[email protected]>
2025-01-26 18:29:22 +00:00
John Scipione e46d9f45b8 Tracker: Shortcuts refactor
Create TShortcuts class that builds shortcut menu items and updates
label, modifiers, enabled status and target. Not every Tracker
shortcut is present but ones used multiple times and many others are.
Update shortcuts in ContainerWindow, DeskWindow, FilePanelPriv,
QueryContainerWindow, VirtualDirectoryWindow and GetInfo HeaderView.

There are two versions of the TShortcuts class, one with a window and
one without. The without-window version is used in the GetInfo window,
everywhere else uses the "smart" window version.

This patch is organizational except fixing two small BeOS bugs:
* Edit query item is always between Open and Open with...
* Repopulate menus when you switch directories in file panels.

Enable "Open parent" item in spatial mode as well as navigation
mode unless in Root, Desktop (Query or Query template) or volume root
if not in "Show disks" mode. Hold down control to override.

BContainerWindow updates:
* Absorb Set...Item() methods into TShortcuts. Add
  UpdateMoveToTrashItem() for "Move to Trash"/"Delete" and many more.
* Absorb ShowContextMenu() improvements from Disks patch.
* Create AddIconSizeMenu() and eliminate duplicate shortcut handling.
  * Put icon size menu in radio mode and refactor item marking.

Replace "New folder" with "New >" menu automatically. Create member
vars and convenience methods to facilitate this. Simplifies building
menus, adding a "New folder" item will automatically be updated to
"New >" if templates are available (except in FilePanel and on the
minimal build you'll just get "New folder").

Refactor Arrange by and Attributes menus. Create support methods.
Create menu on add, populate on update. Do cleanup of detached menu
on Quit().

Refactor SetupOpenWithMenu(). SetupEditQueryItem() got a similar
refactor to be added and removed dynamically. Add FSIsQueriesDir()
to FSUtils used to detect queries directory for Edit query.
* "Edit query" goes between Open and "Open with..." (long story).

UpdateMenu() calls Shortcut()->Update() for all known shortcuts.

Optimize adding/removing dynamic menus so that they are created
and destroyed once and reused again and again.

AddFile...(),    fFile... and "FileContext" becomes
UpdatePose...(), fPose... and "PoseContext".

TTracker changes:
* Skip Desktop in OpenContainerWindow() we setup pose view earlier.
* Move DeskWindow init into DeskWindow constructor and call Init().

DeskWindow changes:
* Replace icon size menu with BContainerWindow::AddIconSizeMenu().
* Remove WindowContextMenu(), handle in BContainerWindow instead.

BPoseView changes:
* Rename kEditItem to kEditName -- better name. Save for Edit someday.
* Use BMessenger::SendMessage() instead of PostMessage(), safer.

BFilePanel updates:
Create the FilePanel menus fresh by overriding the AddMenus() method
instead of copying from BContainerWindow and deleting the items it
doesn't need. This allows us to omit most of the file panel checks.
Add UpdateFileMenu() to update the file menu on RepopulateMenus() and
MenusBeginning().
* Create an AddFavoritesMenu() method and use it to add the menu.
* Override RepopulateMenus() to update just the File and context menus.
* Create Update...Methods() overloading the BContainerWindow versions.
* SetTo() becomes SwitchDirectory()

Unify OpenParent() so that we can call BPoseView::OpenParent() and it
will call the container window or the file panel where appropriate.
Remove BPoseView::ParentIsRoot() and make CanOpenParent() work in both
cases. This means we don't have to check if you are in a file panel or
not when enabling/disabling the "Open parent" item and the Shortcuts
class can simply check CanOpenParent().

Call _inherited SwitchDirectory() to RepopulateMenus() on Root, Trash
and Volumes in FilePanel. This fixes a 25+ year old BeOS bug by
repopulating menus when you switch directories in file panels. Trash,
files in Trash and Root will get the appropriate menu options. For
example "Delete"/"Restore" instead of "Duplicate"/"Move to Trash".

Change-Id: Ic41b148cb6bcf14288cb5588038c13ea12426dc2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7197
Reviewed-by: John Scipione <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-01-26 18:29:22 +00:00
John Scipione 4ae0548774 Terminal: Make Colors window height shorter and font-dependent
Roughly the same height as the Appearance window at 12pt font.

Change-Id: Iaa456aecfde6ebe92f4829e3aabca6a29b68bc08
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8847
Tested-by: Commit checker robot <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-01-22 19:28:58 +00:00
John Scipione 622853ff8e Appearance and Terminal: Move ColorPreview to shared
Move ColorListView and ColorItem to shared in BPrivate namespace.

ColorItem typedef to BPrivate::BColorItem for apps that are already
using this class.

Gravity screensaver:
* ColorItem => BColorItem.
* Use make_color() to set colors.

Make color drop message name agnostic, check for B_RGB_COLOR_TYPE.
Add be:sender and source to drag message.

Add _SetTermColors() convenience method to set colors on all tabs.

Change-Id: I5a9f55d3ab423ccaa341997cf444603373024553
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8846
Reviewed-by: John Scipione <[email protected]>
2025-01-22 19:28:58 +00:00
John Scipione 012d90c553 BColorControl: SetValue and Invoke on color drop if enabled
Change-Id: I055750707ed625b21c6b4cf02faf2509f615e169
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8845
Haiku-Format: Haiku-format Bot <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-01-22 19:28:58 +00:00
John Scipione a6fee6a1ca intel_extreme: Remove spurious whitespace
Change-Id: I5a15cada42d1d527b0d65f89401d04e7771ef4b6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8852
Reviewed-by: waddlesplash <[email protected]>
2025-01-20 19:32:32 +00:00
John Scipione 04bf57110c Tracker: Disallow control characters in file name edit
Change-Id: I1e87768cc70fdd501ca0a4710df619dd2d59ce7a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8170
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: nephele nephele <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-01-20 16:27:04 +00:00
John Scipione 0d50dc1f3e Tracker: Call AdoptSystemColors() to apply read-only tint
2 - 1.147 = 0.853

Change-Id: I260af9d07f5e43e939ce351bfd4036665ad126f4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8269
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-01-17 16:57:38 +00:00
John Scipione 9105063938 BTextView: Use document colors on AdoptSystemColors()
AdoptSystemColors() tints document background color to match panel
color if uneditable.

Calling MakeEditable() will automatically apply or unapply uneditable
background tint if you have previously called AdoptSystemColors().

Parent BView::AdoptSystemColors() sets panel colors, we want document
colors here. Do not alter text color - only view, low and high colors
are changed.

Document AdoptSystemColors() and MakeEditable() in BTextView docs.

Change-Id: Ib215735f27bb01fc2f95fcf2fee0185e5fc83f70
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8263
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-01-17 16:57:38 +00:00
John Scipione 13553050f9 HaikuDepot: MarkupTextView SetForegroundColor to HighUIColor
Also the bullet point color
Allow Usage Conditions window to be resized
Tint disabled color instead of hardcoding

Copyright 2024 Haiku, Inc.

Fixes the other half of #19067

Change-Id: Ibf74d9dd673807b0f107e56cefb5b30916baed96
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8262
Reviewed-by: Adrien Destugues <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-01-17 16:57:38 +00:00
John Scipione 297aa21e46 Deskbar: Always AdoptParentColors() on StatusView
... be_control_look is assumed.

Change-Id: If41f74ede3debd5439093e0172294861f65f5d6b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8832
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-01-14 22:46:39 +00:00
John Scipione e7735d59c3 Deskbar: A few minor style fixes to StatusView (tray)
Change-Id: I89036bda8bc9b93cac90c606dafe0a13cfd8a05d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8831
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-01-14 22:46:39 +00:00
John Scipione 3c18c3d5c6 Tracker: Restore IsFiltering() to IsRefFiltering() or IsTypeAheadFiltering()
Add IsRefFiltering() and IsFiltering() is once again either kind
of filtering: ref or type-ahead.

Use IsRefFiltering() in a few places, otherwise use IsFiltering()
to restore filtering code so that it gets triggered on either kind
of filter.

Make the filtering methods inline to avoid function call overhead.

Fixes #19317

Change-Id: I27407ca33e8f2b967975c8a8ef8de83105442bd4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8715
Reviewed-by: waddlesplash <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
2024-12-26 22:10:31 +00:00
John Scipione ffed6d0bff Tracker: 100 char style fixes to PoseView
Change-Id: Ife469064cd2e92e23da80849d4ba9f07936bf210
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8714
Reviewed-by: waddlesplash <[email protected]>
2024-12-26 22:10:31 +00:00
John Scipione fdd7a7acf2 Network Status: Compose notification icon
... also in Media and Mail servers.

Change-Id: I9a95dc289446ba0dbf138e29cbd6d0b75e6b5ddc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8707
Reviewed-by: waddlesplash <[email protected]>
2024-12-23 17:38:33 +00:00
John Scipione 7e317d9b51 Notifications: Compose size based on font size
Make arrow and close button size font-sensitive.

Compose default window width based on font size.

Eliminate kCloseSize, kEdgePadding, kSmallPadding, kExpandSize
and kPenSize.

Eliminate NotificationView::_DrawCloseButton() in favor of calling
AppGroupView::DrawCloseButton().

AppGroupView::CloseButtonSize() method used in NotificationView.

Eliminate IconSize() from window and view parameter, get icon (and size)
from notification in the view.

Only move text down a line if title is set.

Change-Id: I53654c117bee634d3d8bddf6bf766577bd55b9a3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8706
Reviewed-by: waddlesplash <[email protected]>
2024-12-23 17:38:33 +00:00
John Scipione 8e29e4e3e3 Tracker: Change "multiple selections" => "# selected" in Find window
... for example "2 selected" instead of "multiple selections".
Set minimum volume menu field width to "99 selected".

Refactor ShowVolumeMenuLabel() to have multiple selections once.

Change-Id: I5a2126972d3b93e7dd98ca631606302a59546f53
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8151
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2024-12-23 09:44:41 +00:00
John Scipione 4b27f67f1a Appearance: Redo FontSelectionView to update text color
FontSelectionView was not getting added to the view hierarchy and
thus was not receiving the B_COLORS_UPDATED message when the colors
changed. This was because we wanted to build the grid all at once.
Instead build the grid inside each of the FontSelectionView's and
set the first column to the longest string afterwords so everything
lines up.

This updates the text view colors when the font changes. The rest
of the changes are to fix the view hierarchy so that we don't need
to explicitly call MessageReceived() on the FontSelectionView to
get receive B_COLORS_UPDATED.

Change-Id: Ice6ff0b8a95d522c9994b6b873fac10cf5f71ea4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8246
Tested-by: Commit checker robot <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2024-12-22 19:22:44 +00:00
John Scipione c7c5de0f79 Appearance: Use BLayoutBuilder instead of BGroupLayoutBuilder
Rename GetPreviewBox() to just PreviewBox() matching WebPositive.

Change-Id: I378a76bc3d2742273cb5cfad4863e377103786cd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8245
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2024-12-22 19:22:44 +00:00
John Scipione 512a94bc18 BTextView docs: Document GetFontAndColor() and SetFontAndColor()
Change-Id: Ie284c63690e955d7cfae7e9e66949a63205e8e31
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8270
Reviewed-by: nephele nephele <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2024-12-21 17:32:52 +00:00
John Scipione 10b1abbfde Tracker: Cancel type-ahead filtering on esc
Otherwise esc closes the file panel.

Differentiate between type-ahead and ref filtering in pose view
which is why this was not working in e.g. Expander a ref filter
was set so filtering was also set. We only want to cancel
type-ahead filtering on esc, not ref filtering.

Refer to 'ref filtering' as simply filtering e.g. IsFiltering()
and refer to type-ahead filtering explicity when that is meant.
Rename methods and variables to make it clear whether we're
referring to ref filtering or type-ahead filtering.

If we are ref filtering fill out the filtered pose list again
after stopping type-ahead filtering so that we don't get an empty
file panel in e.g. Expander on esc.

Fixes #13151

Change-Id: I96faf98c3b68d3bcb3d3892c3511ae2449c2f8a4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8689
Reviewed-by: waddlesplash <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
2024-12-18 18:55:05 +00:00
John Scipione bd01f3f156 Tracker: Style fixes related to #13151
Some 100 char fixes
Put looper in a variable and use it a few times
Remove ASSERT statements, we B_DISPATCH_MESSAGE if NULL.
Refactor command modifier key code to use a nested switch
Explict comparisons to NULL

Change-Id: I068a0123461290731b4b5388b802bb4cc7bb2455
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8688
Reviewed-by: waddlesplash <[email protected]>
2024-12-18 04:24:26 +00:00
John Scipione 844099afc1 Expander: Add bottom spacing back in
Change-Id: I8672079196a370e0e4ec817771977372c30cda6c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8687
Reviewed-by: waddlesplash <[email protected]>
2024-12-18 04:24:26 +00:00