0c973c9467
* 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.
33 lines
554 B
C++
33 lines
554 B
C++
/*
|
|
* Copyright 2021-2022, Haiku, Inc. All rights reserved.
|
|
* Distributed under the terms of the MIT License.
|
|
*
|
|
* Authors:
|
|
* Augustin Cavalier <waddlesplash>
|
|
* John Scipione <jscipione@gmail.com>
|
|
*/
|
|
#ifndef _TRACKER_THUMBNAILS_H
|
|
#define _TRACKER_THUMBNAILS_H
|
|
|
|
|
|
#include <Bitmap.h>
|
|
#include <Mime.h>
|
|
|
|
|
|
namespace BPrivate {
|
|
|
|
|
|
class Model;
|
|
|
|
|
|
status_t GetThumbnailFromAttr(Model* model, BBitmap* icon, BSize size);
|
|
bool ShouldGenerateThumbnail(const char* type);
|
|
|
|
|
|
} // namespace BPrivate
|
|
|
|
using namespace BPrivate;
|
|
|
|
|
|
#endif // _TRACKER_THUMBNAILS_H
|