* Get spacing from BControlLook.
* Initialize and place the buttons before the PoseView,
so that they can be used to constrain the PoseView's size.
* Update size limits based on spacing metrics.
Tested against filepanel command, Backgrounds preflet,
and WonderBrush. All seems to still work acceptably, and
now the controls are properly font-size-sensitive.
Fixes#13178.
Now that BAlerts can have custom buttons and change icons during
runtime, we need not maintain a custom "clone" of the BAlert logic
here in the registrar.
While at it, use ComposeIconSize to get larger icons on HiDPI.
This fixes#15704 as BAlerts already use the layout API,
while this logic did not.
Appearance remains the same at the standard decorator sizes (12pt fonts),
but this looks better on larger font sizes. Unfortunately it doesn't
scale quite correctly; the scrollbars in Tracker do not align with this
quite correctly. Probably the -0/-1 need to be adjusted based on the
window border sizes, but we don't have those metrics readily available
in this function. Yet another reason all these classes need a major
refactor...
This way, window metrics both from defaults and those stored and read
from settings will be scaled according to the font size.
This unfortunately adds to the code duplication in Save/RestoreWindowState,
but that code already seems somewhat duplicated and in need of a refactor
anyway.
* Instead of taking an icon_size, which we were having to cast
random integers to anyway, just take a BSize and convert internally
as needed. This simplifies a lot of usages of IconCache methods.
* Compute what B_MINI_ICON size will be at startup. This way,
we do not wind up caching "mini" icons in the fLarge*Icon variables
under HiDPI.
This does have a downside that if anything actually
does try to fetch "true mini" (16x16) icons when the real
ComposeIconSize(B_MINI_ICON) is larger than that, it will wind up
(confusingly) in fLarge*Icon, but that should not cause problems
and after this commit should not happen at all, anyway.
* Make mini-icon-mode use ComposeSize instead of the hardcoded 16x16,
and adjust metrics computations around it.
* Fetch larger icons in MountMenu logic. Also use BString::SetToFormat.
* Remove an unused, deprecated method from BPoseView.
* Rename variables in thumbnail generation code to match new behavior.
This reverts commit 50913d9a6f.
Reason for revert: this change broke the UEFI loader, see ticket #17880
Change-Id: Iefc0e53a09ddff94d7f0f2d4016af9119425af78
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5576
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This gets Deskbar looking somewhat more like its usual self in HiDPI
environments. There are still some hardcoded sizes which need to be
refactored, however.
Instead of applying scaling factors to the font size, use
the label spacing value instead. Also, perform the computation in
_InitData(), which all constructors call, rather than in BMenu.
This takes an int32 (e.g. B_MINI_ICON or another constant) and
then returns a BSize scaled appropriately, the same as ComposeSpacing()
does already for the *_SPACING constants.
This will be used to replace icon size computations throughout the tree.
We want to first try fallbacks with the same style as the main font, if
available, but that introduces the chance of two threads trying to
acquire the same locks in different order, so keep at most the main font
and one fallback locked, and acquire them in a fixed order by address.
Fixes: #17850
Change-Id: Ic352fadc46eb257d2bca4804962b11ab1eb9fa12
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5557
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Also fix a copy/paste error in the command used to generate the list and renamed the temp file
Change-Id: I0a954c78b14ddc802d3c5864323e7a1d82a529b9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5567
Reviewed-by: Oscar Lesta <oscar.lesta@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
when count type is size_t.
Change-Id: Id68582fbd2243d65394e0c2c4d43272823bf778e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5543
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This works similarly on the 32-bit and 64-bit ARM port.
Other architectures call reserve_io_interrupt_vectors() when
initializing the interrupt controller (e.g. PIC, APIC etc.)
so let's do the same on ARM.
Change-Id: If5a360cf23fd01d97d2f20702785bc5da0190052
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5566
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
GICv2 can use interrupt numbers up to 1019:
* 0-15 are SGIs aka ICIs
* 16-31 are PPIs
* 32-1019 are SPIs
Change-Id: I1c19be77105683da3f6988a5607b14dc10a899db
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5565
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
* Better testing of the riscv64 arch by providing
more supported hardware
* Partially based on x512's research in the forums
* Example usage:
../src/tests/qemu-boot-test riscv64 \
kernel:.../u-boot.bin haiku-mmc.image
Change-Id: I9fe9d3c63bd7683818fc28fad2de64545bcd4804
Not all things that accept locale_t can accept LC_GLOBAL_LOCALE,
specifically nl_langinfo_l does not (the specification indicates
that passing it is undefined behavior; indeed, no C library I glanced
at seems to support that.)
So, return a static locale_t pointing to the global values instead.
Fixes#17875 and #17876.
Now that we have locale_t, we can use the musl versions of these functions.
This also fixes a licensing issue: the strptime implementation had an
advertising clause (although in upstream *BSD it was removed, so we
likely could have managed to remove it anyway.)
All filesystems have open_dir calls in their vnode hooks,
but there are some vnode hooks that do not, like FIFOs.
Thus we need to check the hook actually exists.
Fixes#17870.
Creates, opens, tries to open as directory, then unlinks.
The attempt to open as a directory triggers an assertion
in the kernel at present (this is #17870.) The next commit
will fix that.
* adjust format string for thread id
* fix variable name loop vs looper
Change-Id: I3d1924d6ab98981b4b2a3f56689872e35e5bea77
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5562
Reviewed-by: waddlesplash <waddlesplash@gmail.com>