Compare commits

..

4 Commits

Author SHA1 Message Date
Janek Bevendorff
f484d7f5ed Change Security/LockDatabaseIdle default to true 2025-11-16 17:22:00 +01:00
Janek Bevendorff
10bd651355 Enable CodeQL for all PRs and production branches 2025-11-16 09:51:48 +01:00
Janek Bevendorff
b3dbc49161 Remove theme-based menubar icon toggle on macOS
The menubar theme detection on macOS has always been wonky, and with Liquid Glass it has become entirely useless. This removes the icon theme switch and uses the monochrome light icon as a mask until we find a better solution. This should look okay in most cases, unless the user has a very bright wallpaper.
2025-11-15 20:14:15 +01:00
Janek Bevendorff
eefee1f092 Install macOS bundle icons on build
Installs bundle icons to the Resources folder during the build stage and not during the install stage. This ensures that the app has an icon when run directly from the .app folder inside the IDE. Previously, the icon would be installed only when running make install or cpack.
2025-11-15 00:57:30 +01:00
6 changed files with 30 additions and 24 deletions

View File

@@ -2,10 +2,10 @@ name: "CodeQL"
on: on:
push: push:
branches: [ 'develop', 'release/2.7.x' ] branches:
- 'develop'
- 'release/**'
pull_request: pull_request:
# The branches below must be a subset of the branches above
branches: [ 'develop' ]
schedule: schedule:
- cron: '5 16 * * 3' - cron: '5 16 * * 3'

View File

@@ -67,11 +67,6 @@ if(UNIX AND NOT APPLE AND NOT HAIKU)
install(FILES linux/${APP_ID}.appdata.xml DESTINATION ${CMAKE_INSTALL_DATADIR}/metainfo) install(FILES linux/${APP_ID}.appdata.xml DESTINATION ${CMAKE_INSTALL_DATADIR}/metainfo)
endif(UNIX AND NOT APPLE AND NOT HAIKU) endif(UNIX AND NOT APPLE AND NOT HAIKU)
if(APPLE)
install(FILES macosx/Assets.car DESTINATION ${DATA_INSTALL_DIR})
install(FILES macosx/keepassxc.icns DESTINATION ${DATA_INSTALL_DIR})
endif()
if(WIN32) if(WIN32)
install(FILES windows/qt.conf DESTINATION ${BIN_INSTALL_DIR}) install(FILES windows/qt.conf DESTINATION ${BIN_INSTALL_DIR})
endif() endif()

View File

@@ -13,11 +13,11 @@
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
<string>${PROGNAME}</string> <string>${PROGNAME}</string>
<key>CFBundleIconFile</key> <key>CFBundleIconFile</key>
<string>keepassxc.icns</string> <string>${MACOSX_BUNDLE_ICON_NAME}.icns</string>
<key>CFBundleIconName</key> <key>CFBundleIconName</key>
<string>keepassxc</string> <string>${MACOSX_BUNDLE_ICON_NAME}</string>
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>
<string>org.keepassxc.keepassxc</string> <string>${MACOSX_BUNDLE_IDENTIFIER}</string>
<key>CFBundleInfoDictionaryVersion</key> <key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string> <string>6.0</string>
<key>CFBundleName</key> <key>CFBundleName</key>

View File

@@ -421,7 +421,12 @@ if(WIN32)
endif() endif()
# Main Executable Definition # Main Executable Definition
add_executable(${PROGNAME} main.cpp)
target_link_libraries(${PROGNAME} keepassxc_gui)
set_target_properties(${PROGNAME} PROPERTIES ENABLE_EXPORTS ON)
if(WIN32) if(WIN32)
set_target_properties(${PROGNAME} PROPERTIES WIN32 ON)
include(GenerateProductVersion) include(GenerateProductVersion)
generate_product_version( generate_product_version(
WIN32_ResourceFiles WIN32_ResourceFiles
@@ -432,20 +437,24 @@ if(WIN32)
VERSION_PATCH ${KEEPASSXC_VERSION_PATCH} VERSION_PATCH ${KEEPASSXC_VERSION_PATCH}
) )
list(APPEND WIN32_ResourceFiles "${CMAKE_SOURCE_DIR}/share/windows/icon.rc") list(APPEND WIN32_ResourceFiles "${CMAKE_SOURCE_DIR}/share/windows/icon.rc")
endif() target_sources(${PROGNAME} PUBLIC ${WIN32_ResourceFiles})
add_executable(${PROGNAME} WIN32 main.cpp ${WIN32_ResourceFiles}) elseif(APPLE AND WITH_APP_BUNDLE)
target_link_libraries(${PROGNAME} keepassxc_gui) set(MACOSX_BUNDLE_IDENTIFIER org.keepassxc.keepassxc)
set_target_properties(${PROGNAME} PROPERTIES ENABLE_EXPORTS ON) set(MACOSX_BUNDLE_ICON_NAME keepassxc)
configure_file("${CMAKE_SOURCE_DIR}/share/macosx/Info.plist.cmake" ${CMAKE_CURRENT_BINARY_DIR}/Info.plist)
# macOS App Bundle install(FILES "${CMAKE_SOURCE_DIR}/share/macosx/embedded.provisionprofile" DESTINATION ${BUNDLE_INSTALL_DIR})
if(APPLE AND WITH_APP_BUNDLE) set(MACOSX_BUNDLE_RESOURCE_FILES
install(FILES ${CMAKE_SOURCE_DIR}/share/macosx/embedded.provisionprofile DESTINATION ${BUNDLE_INSTALL_DIR}) "${CMAKE_SOURCE_DIR}/share/macosx/Assets.car"
configure_file(${CMAKE_SOURCE_DIR}/share/macosx/Info.plist.cmake ${CMAKE_CURRENT_BINARY_DIR}/Info.plist) "${CMAKE_SOURCE_DIR}/share/macosx/keepassxc.icns"
)
set_target_properties(${PROGNAME} PROPERTIES set_target_properties(${PROGNAME} PROPERTIES
MACOSX_BUNDLE ON MACOSX_BUNDLE ON
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/Info.plist MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_BINARY_DIR}/Info.plist"
CPACK_BUNDLE_APPLE_ENTITLEMENTS "${CMAKE_SOURCE_DIR}/share/macosx/keepassxc.entitlements") CPACK_BUNDLE_APPLE_ENTITLEMENTS "${CMAKE_SOURCE_DIR}/share/macosx/keepassxc.entitlements"
RESOURCE "${MACOSX_BUNDLE_RESOURCE_FILES}"
)
target_sources(${PROGNAME} PUBLIC ${MACOSX_BUNDLE_RESOURCE_FILES})
if(QT_MAC_USE_COCOA AND EXISTS "${QT_LIBRARY_DIR}/Resources/qt_menu.nib") if(QT_MAC_USE_COCOA AND EXISTS "${QT_LIBRARY_DIR}/Resources/qt_menu.nib")
install(DIRECTORY "${QT_LIBRARY_DIR}/Resources/qt_menu.nib" install(DIRECTORY "${QT_LIBRARY_DIR}/Resources/qt_menu.nib"

View File

@@ -139,7 +139,7 @@ static const QHash<Config::ConfigKey, ConfigDirective> configStrings = {
{Config::Security_ClearSearch, {QS("Security/ClearSearch"), Roaming, false}}, {Config::Security_ClearSearch, {QS("Security/ClearSearch"), Roaming, false}},
{Config::Security_ClearSearchTimeout, {QS("Security/ClearSearchTimeout"), Roaming, 5}}, {Config::Security_ClearSearchTimeout, {QS("Security/ClearSearchTimeout"), Roaming, 5}},
{Config::Security_HideNotes, {QS("Security/Security_HideNotes"), Roaming, false}}, {Config::Security_HideNotes, {QS("Security/Security_HideNotes"), Roaming, false}},
{Config::Security_LockDatabaseIdle, {QS("Security/LockDatabaseIdle"), Roaming, false}}, {Config::Security_LockDatabaseIdle, {QS("Security/LockDatabaseIdle"), Roaming, true}},
{Config::Security_LockDatabaseIdleSeconds, {QS("Security/LockDatabaseIdleSeconds"), Roaming, 240}}, {Config::Security_LockDatabaseIdleSeconds, {QS("Security/LockDatabaseIdleSeconds"), Roaming, 240}},
{Config::Security_LockDatabaseMinimize, {QS("Security/LockDatabaseMinimize"), Roaming, false}}, {Config::Security_LockDatabaseMinimize, {QS("Security/LockDatabaseMinimize"), Roaming, false}},
{Config::Security_LockDatabaseScreenLock, {QS("Security/LockDatabaseScreenLock"), Roaming, true}}, {Config::Security_LockDatabaseScreenLock, {QS("Security/LockDatabaseScreenLock"), Roaming, true}},

View File

@@ -92,12 +92,14 @@ QIcon Icons::trayIcon(bool unlocked)
} }
QIcon i; QIcon i;
#if defined(Q_OS_MACOS) || defined(Q_OS_WIN) #if defined(Q_OS_WIN)
if (osUtils->isStatusBarDark()) { if (osUtils->isStatusBarDark()) {
i = icon(QString("keepassxc-monochrome-light%1").arg(suffix), false); i = icon(QString("keepassxc-monochrome-light%1").arg(suffix), false);
} else { } else {
i = icon(QString("keepassxc-monochrome-dark%1").arg(suffix), false); i = icon(QString("keepassxc-monochrome-dark%1").arg(suffix), false);
} }
#elif defined(Q_OS_MACOS)
i = icon(QString("keepassxc-monochrome-light%1").arg(suffix), false);
#else #else
i = icon(QString("%1-%2%3").arg(applicationIconName(), iconAppearance, suffix), false); i = icon(QString("%1-%2%3").arg(applicationIconName(), iconAppearance, suffix), false);
#endif #endif