64348 Commits

Author SHA1 Message Date
Augustin Cavalier
0a48878fba Debugger: Set AUTO_UPDATE_SIZE_LIMITS and adjust default size of Teams window. 2022-08-30 23:00:56 -04:00
Augustin Cavalier
1f34a738be Debugger: Use monospace font in tables that display addresses.
This makes stack traces, registers, variables, etc. so much nicer
and easier to read and work with. Ahh, much better.
hrev56394
2022-08-30 22:43:56 -04:00
Augustin Cavalier
1f72988e61 Debugger: Improve appearance of TeamsWindow insets and spacing.
The buttons are now aligned to the scroll bar and window resize knob,
by using BControlLook::GetScrollBarWidth. (Hmm, perhaps it might make
more sense to just have scrollbar sizes be a kind of insets, which can
be gotten via B_USE_SCROLL_BAR_INSETS, and then drop this extra method
altogether? After all there are a lot of applications which align to
scroll bars...)
2022-08-30 22:28:04 -04:00
Augustin Cavalier
af791479cb Debugger: Initial fixes to TeamsListView for HiDPI.
* Use BControlLook::ComposeIconSize.
 * Use LabelSpacing for row heights.
2022-08-30 22:26:32 -04:00
Augustin Cavalier
861282ffa7 BColumnListView: Dynamic scrollbar size support.
Improves appearance on HiDPI.
2022-08-30 22:14:16 -04:00
Andrew Lindesay
8d18358cdf HaikuDepot: Fix Image Rendering
Resolve an issue with rendering package
icons when "Disable user addons" is
turned off.

Relates to #17862

Change-Id: Ic2d17626c40a97598613b8f21218d6829de97bbf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5556
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jacob Secunda <secundaja@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
hrev56393
2022-08-31 01:16:37 +00:00
Jérôme Duval
8045bb174e kernel/vm: also honor page protections on copy-on-write
this fixes #17895

Change-Id: Ide6cb044cf96213b4bae7eb62235f988b73c0fb1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5601
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
hrev56392
2022-08-30 16:43:41 +00:00
Augustin Cavalier
90d62fd900 TLS.h: Drop inline assembly from the header.
This was a holdover from BeOS, which did this as inline assembly.
We do not on any platform other than 32-bit x86, and even there
we may have preferred to do things a little differently on non-BeOS
ABIs.

Most things ported from other systems, or even native apps, are going to
use _Thread_local variables anyway, which will bypass this system
altogether.
hrev56391
2022-08-30 00:00:04 -04:00
Augustin Cavalier
3b7f223770 ShowImage: Appease GCC2. hrev56390 2022-08-29 16:59:37 -04:00
Augustin Cavalier
bbee4c3ab6 ShowImage: Do not hardcode the font size of the status view. hrev56389 2022-08-29 16:10:38 -04:00
Augustin Cavalier
87d8b1776f ShowImage: Use BControlLook::ComposeIconSize.
Also use BBitmap::ImportBits instead of a manual copy, while at it.
2022-08-29 16:08:27 -04:00
Augustin Cavalier
fac73debbf Deskbar: Compute basic metrics earlier, in TBarApp::InitSettings().
This way we know the minimum and maximum window width earlier
and consumers of them do not come up with "0" incorrectly.

Fixes #17890.
hrev56388
2022-08-29 15:55:41 -04:00
Augustin Cavalier
f34e3931e8 Deskbar: Correct sizing and placement of icons in window menus.
Fixes #17891.
2022-08-29 15:36:48 -04:00
Javier Steinaker
4f0d375c54 WebPositive: added shortcut to cycle through tabs like in every other browser
Change-Id: I3cb543948929c20e64c1c8c245a568fb81637a3d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5574
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
hrev56387
2022-08-28 18:49:19 +00:00
Autocomitter
100e2a19c1 Update translations from Pootle hrev56386 2022-08-27 08:22:26 +00:00
Augustin Cavalier
e5f774e848 Tracker: Rework file-panel initialization.
* 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.
hrev56385
2022-08-26 23:49:24 -04:00
Augustin Cavalier
34ab706011 StyledEdit: Do not do font->Size() / 12 but rather downscale directly. hrev56384 2022-08-26 23:01:32 -04:00
Augustin Cavalier
e038086025 BButton: Adjust the spacing and minimum values to use LabelSpacing.
Seems to fix the last part of #16180.
hrev56383
2022-08-26 22:29:29 -04:00
Augustin Cavalier
d56ff162fb Tracker: Adjust metrics of the CountView.
Should look the same at 12pt font but more consistent at higher
font sizes.
2022-08-26 22:04:50 -04:00
Augustin Cavalier
67ca14e889 registrar: Rewrite shutdown dialog to just use a BAlert.
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.
hrev56382
2022-08-26 21:27:54 -04:00
Augustin Cavalier
f5fcee0157 BAlert documentation: Clarify that SetIcon assumes ownership.
It always did, this documentation was incorrect.
Also, we introduced this method, it wasn't present on R5.
2022-08-26 21:25:23 -04:00
Augustin Cavalier
f583d90436 BAlert: Support changing icons while the alert is running.
After all, you can change buttons, text, and the other settings,
so why not support this, too?
2022-08-26 21:24:53 -04:00
Augustin Cavalier
a649df28ac BAlert: Fix preferred-size computation.
The icon is rendered starting at label-spacing * 3, not * 2.
This meant the icon got cut off in some rare scenarios, mostly
ones where text wrapped.
2022-08-26 21:23:29 -04:00
Augustin Cavalier
8fab9f8a9f Terminal: Assign default font size from system font size.
We already used the system font to set the family and style,
so do the same for the size as well.

Fixes #16176.
hrev56381
2022-08-26 19:32:34 -04:00
Augustin Cavalier
341f767dfd Terminal: Use BControlLook for scrollbar sizing.
Improves appearance under HiDPI.
2022-08-26 19:27:18 -04:00
Augustin Cavalier
287712a647 app_server: Adjust borders of the resize knob depending on the handle size.
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...
hrev56380
2022-08-26 19:16:48 -04:00
Augustin Cavalier
8f3508d9c5 desklink: Make use of BControlLook::ComposeIconSize().
Fixes #16370.
2022-08-26 18:53:13 -04:00
Augustin Cavalier
6970f0fdab DiskProbe: Adjust layout building in StringEditor.
Does not seem to affect #13164.
hrev56379
2022-08-26 18:38:43 -04:00
Augustin Cavalier
a57ccf381f DiskProbe: Use BControlLook::ComposeIconSize() and adjust font size computation. 2022-08-26 18:25:04 -04:00
Augustin Cavalier
46ed1da36a Tracker: Apply scaling to window metrics.
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.
hrev56378
2022-08-26 18:02:02 -04:00
Augustin Cavalier
355827ad33 Network preferences: Use BControlLook::ComposeIconSize(). 2022-08-26 17:44:26 -04:00
Augustin Cavalier
a57bf2191b Tracker: Basic adjustments to InfoWindow to respect BControlLook.
Improves appearance under HiDPI.
2022-08-26 17:32:18 -04:00
Augustin Cavalier
0c973c9467 Tracker: Refactor IconCache size handling and usages.
* 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.
2022-08-26 17:24:44 -04:00
Augustin Cavalier
9f4bb0f544 Deskbar: Compute more metrics instead of hardcoding them. 2022-08-26 15:37:49 -04:00
Augustin Cavalier
da9dee377d HaikuControlLook: Scale the width of the popup dropdown region.
Instead of hardcoding it.
TODO: Other ControlLooks in the tree should also be fixed for this.
2022-08-26 14:42:17 -04:00
Augustin Cavalier
f74699a934 BTabView: Compose padding from BControlLook::DefaultLabelSpacing.
Greatly improves appearance on HiDPI.
2022-08-26 13:59:19 -04:00
David Karoly
8ca91ead3d Revert "boot/efi: fall back to legacy UART if EFI protocol is not available"
This reverts commit 50913d9a6fa0d7ab7bb32d584d0b9749024201fc.

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>
hrev56377
2022-08-26 15:42:58 +00:00
Augustin Cavalier
1be8560567 Add casts to appease GCC2 following recent changes. hrev56376 2022-08-26 00:42:32 -04:00
Augustin Cavalier
4e2c07efa4 BIconButton: Use BControlLook::ComposeIconSize().
This isn't perfect as the margins are not yet scaled,
but at least the toolbar buttons in WebPositive now
change with the font size.
hrev56375
2022-08-25 17:10:59 -04:00
JackBurton79
7b3d134fae Screen preflet: fix possible NULL pointer dereference
Change-Id: Ia343cb2cba23f02d5504dfb849a059f041138119
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5571
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
hrev56374
2022-08-25 21:10:15 +00:00
Augustin Cavalier
1e0308a84d Deskbar: Use BControlLook::ComposeIconSize() and other metrics routines.
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.
hrev56373
2022-08-25 16:52:10 -04:00
Augustin Cavalier
cb0165c41d BMenu: Adjust padding computation logic.
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.
2022-08-25 16:50:42 -04:00
Augustin Cavalier
3efde1bfba Tracker: Use BControlLook::ComposeIconSize.
One computation was functionally equivalent to the new method,
other places were not scaling icons at all.

Fixes #13177.
2022-08-25 16:48:56 -04:00
Augustin Cavalier
56d76d9a0a BAlert: Make use of the new BControlLook::ComposeIconSize().
While we're at it, also use DefaultLabelSpacing instead of
the icon size scaling factor.
2022-08-25 16:46:35 -04:00
Augustin Cavalier
874a2a7287 BControlLook: Introduce ComposeIconSize().
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.
2022-08-25 16:45:48 -04:00
Augustin Cavalier
089f15adec Tracker: Remove some unneeded includes. 2022-08-25 14:27:05 -04:00
Máximo Castañeda
a4dfc6aa74 app_server: fix deadlock in GlyphLayoutEngine
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>
hrev56372
2022-08-25 17:16:55 +00:00
JackBurton79
fca54d80f2 Screen preflet: fix extra spaces in certain vendor code
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>
hrev56371
2022-08-25 17:13:19 +00:00
Jérôme Duval
46c2fb2ffe kernel/fd: use loop variable type size_t
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>
hrev56370
2022-08-25 17:12:19 +00:00
David Karoly
cd5f6f2502 kernel/arm: fix system_time for generic timer
Change-Id: Ief7b0638f40ba5deee27f3551e8870bfb6216a4d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5569
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
hrev56369
2022-08-25 12:43:59 +00:00