mirror of
https://github.com/Murmele/Gittyup.git
synced 2024-09-17 13:37:18 +03:00
depending on the OS use different heights
This commit is contained in:
parent
69e88672c7
commit
d937efc70d
@ -64,6 +64,7 @@ endif()
|
||||
find_package(Qt5 5.12 COMPONENTS ${QT_MODULES} LinguistTools REQUIRED)
|
||||
if (FLATPAK)
|
||||
find_package(Qt5 5.15 COMPONENTS XcbQpa REQUIRED)
|
||||
add_compile_definitions(FLATPAK)
|
||||
endif()
|
||||
|
||||
set(QT_TRANSLATIONS_DIR "${Qt5_DIR}/../../../translations")
|
||||
|
@ -194,7 +194,14 @@ void TextEditor::applySettings()
|
||||
|
||||
// Initialize markers.
|
||||
QColor background = palette().color(QPalette::Base);
|
||||
int fontHeight = pointSize * textHeightFactorCheckBoxSize;
|
||||
int fontHeight;
|
||||
// On windows it looks ugly when using pointSize, but on
|
||||
// linux with flatpak textHeight looks strange
|
||||
#if defined(FLATPAK)
|
||||
fontHeight = pointSize * textHeightFactorCheckBoxSize;
|
||||
#else
|
||||
fontHeight = textHeight(0);
|
||||
#endif
|
||||
setStatusDiff(mStatusDiff); // to apply margin width
|
||||
mStagedIcon = stagedUnstagedIcon(
|
||||
true, background, fontHeight);
|
||||
@ -299,7 +306,12 @@ void TextEditor::setStatusDiff(bool statusDiff)
|
||||
{
|
||||
mStatusDiff = statusDiff;
|
||||
if (mStatusDiff) {
|
||||
setMarginWidthN(Staged, fontPointSize(0) * textHeightFactorCheckBoxSize);
|
||||
#if defined(FLATPAK)
|
||||
setMarginWidthN(Staged, fontPointSize(0) * textHeightFactorCheckBoxSize);
|
||||
#else
|
||||
setMarginWidthN(Staged, textHeight(0));
|
||||
#endif
|
||||
|
||||
setMarginSensitiveN(Staged, true); // to change by mouseclick staged/unstaged
|
||||
} else {
|
||||
setMarginWidthN(Staged, 0);
|
||||
|
@ -6,10 +6,6 @@ add_library(tools
|
||||
ShowTool.cpp
|
||||
)
|
||||
|
||||
if (FLATPAK)
|
||||
target_compile_definitions(tools PRIVATE FLATPAK)
|
||||
endif()
|
||||
|
||||
target_link_libraries(tools
|
||||
conf
|
||||
git
|
||||
|
@ -60,10 +60,6 @@ add_library(ui
|
||||
|
||||
target_compile_definitions(ui PRIVATE BUILD_DESCRIPTION="${BUILD_DESCRIPTION}")
|
||||
|
||||
if (FLATPAK)
|
||||
target_compile_definitions(ui PRIVATE FLATPAK)
|
||||
endif()
|
||||
|
||||
target_include_directories(ui PRIVATE
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user