Commit Graph

13 Commits

Author SHA1 Message Date
Charles Kerr
bfa1950fbe feat: native icons in Qt client (#7819)
* chore: savepoint

* chore: code style

* refactor: add std::string_view constructor for NativeIcon::Spec

* chore: add TODO comment

* feat: honor per-desktop HIG on when to show menu icons

* chore: remove Faenza system-run icon

unused since b58e95910b

* chore: remove Faenza view-refresh icon

not needed due to b58e95910b

* chore: remove Faenza media-playback-pause icon

not needed due to b58e95910b

* chore: remove Faenza media-playback-start icon

not needed due to b58e95910b

* chore: add a safeguard against merging with incomplete TODO items

* feat: add more icons

refactor: remove some tracer cerr statements

* refactor: remove IconCache use from MainWindow

* chore: remove Faenza icon set

* chore: re-enable remote session network icon

* fix: FTBFS on Windows

* refactor: use symbolic names for Segoe icons

* docs: add links to Segoe MDL2 Assets icon list

* chore: savepoint

segoe icons work

still a WIP; includes test code that should not ship

* feat: use segoe::FastForward for action_StartNow

feat: use segoe::Move for action_SetLocation

refactor: make it easier for devs to force a font at compile time for development work

segoe license does not allow bundling but does allow dev work

chore: code_style.sh

* refactor: remove unused addEmblem()

* docs: add code comment on how to force an icon font

* fix: Win 10, 11 icons play nicely with dark mode

* chore: savepoint

add draft of SF Symbol -> QPixmap loader

* chore: remove dangling font reference from qrc file

* fix: FTBFS

* refactor: use bribri code for NSImage -> QPixmap

* feat: support dark, light mode when rendering SF Symbol monochrome icons

* fixup! feat: support dark, light mode when rendering SF Symbol monochrome icons

fix: fail gracefully on macOS 11

* chore: code style

* chore: tweak some SF Symbol icon choices

* chore: consistent uppercase for hex segoe QChars

* chore: undefine DEV_FORCE_FONT_FAMILY and DEV_FORCE_FONT_RESOURCE

* chore: savepoint

* refactor: clean up NativeIcon impl

* refactor: remove unused MenuMode::Other

* refactor: DRY in FilterBar::createActivityCombo()

* chore: remove obsolete code comment

* refactor: rename icons::Facet as icons::Type

* fix: oops

* refactor: minor cleanup

* fix: tyop

* chore: remove unused #includes

* fix: add modes for some icons

* refactor: tweak some icon choices on macOS

* fix: ensure icons are visible on File, Help menus

fix: remove unused local variable

* refactor: tweak some icon choices for XDG

* refactor: remove the fallback QStyle::StandardPixmaps

These interfere with deciding whether an icon is well-defined and
unambiguous as per the macOS and Windows HIG guidelines.

If a standard or unambiguous icon exists in the native icon sets,
specify it with an SF Symbols name, a Segoe codepoint,
or XDG standard icon name. Otherwise, leave those fields blank.

* refactor: remove unused #includes

* docs: add "choosing icons" section in NativeIcons.cc

* refactor: simplify icons::shouldBeShownInMenu()

* refactor: reduce unnecessary code shear from main

* refactor: make TorrentDelegate::warning_emblem_ const

* refactor: extract-method MainWindow::updateActionIcons()

* feat: update MainWindow icons when light/dark theme changes

* feat: restore the QStyle::StandardPixmaps as fallbacks

Can be used on older Windows / macOS if Segoe or SF Symbols are unavailable

* refactor: add button text for add/edit/remove tracker buttons

QStyle::StandardPixmap doesn't have good icons for these,
so let's ensure that these buttons have visible text.

* fix: building NativeIconMac.mm on mac even if not clang

* chore: iwyu in new code

* docs: tweak the "Choosing Icons" comments again

* fix: handle changed QStyles in icons::icon()

do not cache point_sizes set between calls

refactor: const correctness

* fixup! refactor: simplify icons::shouldBeShownInMenu()

refactor: minor code tweak, declare vars in order that they are used
2025-11-30 10:09:20 -06:00
Julien
8ac323d5d6 chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
Julien
4b8cfa2e57 chore: update copyrights to 2023 (#4834) 2023-02-11 14:49:42 -06:00
Charles Kerr
83ffa6bf1b chore: fix spdx abbreviations (#3602) 2022-08-08 13:05:39 -05:00
Charles Kerr
bf1d668f9a refactor: make accessor functions constexpr (#3276) 2022-06-12 22:59:30 -05:00
Charles Kerr
df1cca9b57 chore: update copyright years, make notices consistent (#2463) 2022-01-20 12:27:56 -06:00
Mike Gelfand
eeb82b2fd3 Adjust theme icons lookup logic to resemble that of GTK (Qt client) (#2288)
Look for RTL and symbolic icon variants for each icon that we load. The
only exception here is Transmission's own icons, where it doesn't make
sense (the way I see it).
2021-12-09 11:13:04 +03:00
Mike Gelfand
db3d40d0ed Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
Charles Kerr
73fdd722a7 Sonarcloud warnings 3 (#1498)
* chore: use ClassName:: for calling static methods

* chore: prefer to initialize member data in the class initializer
2020-11-01 19:13:32 -06:00
Mike Gelfand
7cbfaf9d59 Fix qt/IconCache includes 2020-10-14 13:18:14 +03:00
Charles Kerr
f59118d1fe feat: add torrent-get 'primary-mime-type' to RPC. (#1464)
* feat: add torrent-get 'primary-mime-type' to RPC.

This is a cheap way for RPC clients to know what type of content is in a
torrent. This info can be used to display the torrent, e.g. by using an
icon that corresponds to the mime type.

* use size_t for content byte count

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>

* explicit boolean expressions

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>

* use uint64_t for content byte counts

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>

* avoid unnecessary logic branches

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>

* explicit cast

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>

* refactor: add an autogenerated mime-type.h header

* chore: maybe fix the win32 FTBFS

* chore: add mime-types.[ch] to xcode

* Squashed commit of the following:

commit 4c7153fa48
Author: Mike Gelfand <mikedld@users.noreply.github.com>
Date:   Tue Oct 13 03:15:19 2020 +0300

    Remove autotools-based build system (#1465)

    * Support .git files (e.g. for worktrees, submodules)
    * Fix symlinks in source tarball, switch to TXZ, adjust non-release name
    * Remove autotools stuff

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
2020-10-13 10:33:56 -05:00
Charles Kerr
0bd915c34c fixup! refactor: speed up FaviconCache::add() again. (#1402) 2020-09-02 19:28:36 -05:00
Charles Kerr
68920f5fa6 refactor: remove exit-time destructors from transmission-qt (#1395)
* refactor: remove exit-time destructors from transmission-qt
2020-08-15 10:42:51 -05:00