Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
3a152ef
remove submodule travis-lazarus
GerryFerdinandus Nov 10, 2023
0872c81
add support for openSSL 3.x
GerryFerdinandus Nov 10, 2023
012d85b
Update Lazarus project file
GerryFerdinandus Nov 10, 2023
dffb838
Add: GitHub Action
GerryFerdinandus Nov 10, 2023
ab20219
Fix compiler warning
GerryFerdinandus Nov 10, 2023
92ad634
Show in form caption the LCL and FPC version
GerryFerdinandus Nov 10, 2023
7b78cc8
remove openSSL dll file
GerryFerdinandus Nov 10, 2023
8c95f4c
add: snap.yml
GerryFerdinandus Nov 14, 2023
ad43862
Add GitHub actions badges
GerryFerdinandus Nov 14, 2023
80d2d4b
Upgrade snap core 18 to 22
GerryFerdinandus Nov 14, 2023
1711e3e
macOS: Do not switch to the dark theme
GerryFerdinandus Nov 15, 2023
c9843eb
Add: GitHub commits since latest release badge
GerryFerdinandus Nov 15, 2023
24b6714
undo: macOS Do not switch to the dark theme
GerryFerdinandus Nov 16, 2023
82a30f8
fix: TStringGrid dark theme
GerryFerdinandus Nov 16, 2023
b332440
Move pictures to release download
GerryFerdinandus Nov 16, 2023
c1af989
Add macOS Codesign and notarization.
GerryFerdinandus Nov 17, 2023
92f9927
Remove Travis-CI build files
GerryFerdinandus Nov 17, 2023
2627a0b
Update version (1.32.0.Beta.6) -> (1.33.0)
GerryFerdinandus Nov 17, 2023
25d88b5
Remove notarization.zip during the build process.
GerryFerdinandus Nov 18, 2023
ff234eb
Test OpenSSL works on Linux CI
GerryFerdinandus Nov 19, 2023
f803916
Snap: Skip dummy widget on startup.
GerryFerdinandus Nov 21, 2023
f42631c
Fix: Text doesn't fit
GerryFerdinandus Dec 7, 2023
637593e
Add: flatpak program uses different data folder
GerryFerdinandus Dec 7, 2023
2dba1e7
snap: use kde-neon
GerryFerdinandus Dec 7, 2023
d7f4810
Fix: Text doesn't fit
GerryFerdinandus Dec 12, 2023
a6ee202
Add freedesktop-metainfo
GerryFerdinandus Dec 12, 2023
af12590
fix: appstream-util validate error
GerryFerdinandus Dec 13, 2023
4c99819
Add Flathub download link
GerryFerdinandus Dec 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: TStringGrid dark theme
The dark theme for Linux and macOS cannot use AlternateColor.
Even rows are visible, uneven rows are invisible.
[skip ci]
  • Loading branch information
GerryFerdinandus committed Nov 16, 2023
commit 82a30f8a193ac91e7ae122a6b04d0fc59f2988e9
23 changes: 19 additions & 4 deletions source/code/controler_trackerlist_online.pas
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ interface

type

TDefaultChecked = function(const TrackerURL: UTF8String): boolean of object;
TDefaultChecked = function(const TrackerURL: utf8string): boolean of object;

{ TControlerTrackerListOnline }

Expand All @@ -35,7 +35,7 @@ TControlerTrackerListOnline = class
procedure SetChecked(index: integer; AValue: boolean);
procedure ShowTrackerStatus(Visible: boolean);
procedure AppendRow(Checked: boolean; Status: TTrackerListOnlineStatus;
const TrackerURL: UTF8String);
const TrackerURL: utf8string);
public
property Checked[index: integer]: boolean read GetChecked write SetChecked;
function TrackerURL(index: integer): string;
Expand Down Expand Up @@ -65,6 +65,17 @@ implementation
{ TControlerTrackerListOnline }


function IsDarkTheme: boolean;
// by "Hansaplast" & "Alextp" from Lazarus forum
function _Level(C: TColor): double;
begin
Result := Red(C) * 0.3 + Green(C) * 0.59 + Blue(C) * 0.11;
end;

begin
Result := _Level(ColorToRGB(clWindow)) < _Level(ColorToRGB(clWindowText));
end;

function TControlerTrackerListOnline.DownloadTrackers_All_Live_Stable: boolean;
begin
Result := FNewTrackon.Download_All_Live_Stable;
Expand All @@ -88,7 +99,11 @@ constructor TControlerTrackerListOnline.Create(StringGridTorrentURL: TStringGrid
FStringGridTorrentURL := StringGridTorrentURL;
FStringGridTorrentURL.RowCount := 1;
FStringGridTorrentURL.FixedRows := 1;
FStringGridTorrentURL.AlternateColor := clCream;

if not IsDarkTheme then
begin // The dark theme for Linux and macOS cannot use AlternateColor. Text will be invisible.
FStringGridTorrentURL.AlternateColor := clCream;
end;

FSelect := FStringGridTorrentURL.Columns.Add;
FSelect.Title.Caption := 'Keep';
Expand Down Expand Up @@ -144,7 +159,7 @@ procedure TControlerTrackerListOnline.SetChecked(index: integer; AValue: boolean


procedure TControlerTrackerListOnline.AppendRow(Checked: boolean;
Status: TTrackerListOnlineStatus; const TrackerURL: UTF8String);
Status: TTrackerListOnlineStatus; const TrackerURL: utf8string);
var
CheckedStr, StatusStr: string;
begin
Expand Down
1 change: 0 additions & 1 deletion source/code/main.lfm
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ object FormTrackerModify: TFormTrackerModify
Top = 0
Width = 1165
Align = alClient
AlternateColor = clWhite
ColCount = 0
FixedCols = 0
FixedRows = 0
Expand Down