mirror of
https://git.suyu.dev/suyu/suyu
synced 2025-01-09 16:03:21 +00:00
9ef9ca0927
Allows creating desktop shortcuts with icons for yuzu games. Co-Authored-By: Jeroen van Schijndel <13182141+roenyroeny@users.noreply.github.com>
28 lines
859 B
C++
28 lines
859 B
C++
// SPDX-FileCopyrightText: 2015 Citra Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <QFont>
|
|
#include <QString>
|
|
|
|
/// Returns a QFont object appropriate to use as a monospace font for debugging widgets, etc.
|
|
[[nodiscard]] QFont GetMonospaceFont();
|
|
|
|
/// Convert a size in bytes into a readable format (KiB, MiB, etc.)
|
|
[[nodiscard]] QString ReadableByteSize(qulonglong size);
|
|
|
|
/**
|
|
* Creates a circle pixmap from a specified color
|
|
* @param color The color the pixmap shall have
|
|
* @return QPixmap circle pixmap
|
|
*/
|
|
[[nodiscard]] QPixmap CreateCirclePixmapFromColor(const QColor& color);
|
|
|
|
/**
|
|
* Saves a windows icon to a file
|
|
* @param path The icons path
|
|
* @param image The image to save
|
|
* @return bool If the operation succeeded
|
|
*/
|
|
[[nodiscard]] bool SaveIconToFile(const std::string_view path, const QImage& image);
|