Skip to content

Commit

Permalink
v1.5 + Improved interface (Plasma/Hi-DPI)
Browse files Browse the repository at this point in the history
  • Loading branch information
AKotov-dev committed Mar 2, 2023
1 parent 493d302 commit 53322d4
Show file tree
Hide file tree
Showing 11 changed files with 106 additions and 88 deletions.
68 changes: 34 additions & 34 deletions pchanger/backup/pchanger.lps
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<Filename Value="pchanger.lpr"/>
<IsPartOfProject Value="True"/>
<EditorIndex Value="-1"/>
<CursorPos Y="24"/>
<CursorPos X="20"/>
<UsageCount Value="47"/>
</Unit0>
<Unit1>
Expand All @@ -50,8 +50,8 @@
<ResourceBaseClass Value="Form"/>
<UnitName Value="Unit1"/>
<IsVisibleTab Value="True"/>
<TopLine Value="150"/>
<CursorPos X="55" Y="163"/>
<TopLine Value="197"/>
<CursorPos Y="216"/>
<UsageCount Value="47"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
Expand All @@ -63,7 +63,7 @@
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<EditorIndex Value="-1"/>
<CursorPos X="47" Y="12"/>
<CursorPos X="14"/>
<UsageCount Value="41"/>
</Unit2>
<Unit3>
Expand Down Expand Up @@ -96,123 +96,123 @@
<JumpHistory Count="30" HistoryIndex="29">
<Position1>
<Filename Value="unit1.pas"/>
<Caret Line="66" Column="81" TopLine="66"/>
<Caret Line="184" Column="3" TopLine="177"/>
</Position1>
<Position2>
<Filename Value="unit1.pas"/>
<Caret Line="158" Column="3" TopLine="63"/>
<Caret Line="161" TopLine="157"/>
</Position2>
<Position3>
<Filename Value="unit1.pas"/>
<Caret Line="159" Column="3" TopLine="128"/>
<Caret Line="189" Column="6" TopLine="179"/>
</Position3>
<Position4>
<Filename Value="unit1.pas"/>
<Caret Line="181" Column="16" TopLine="167"/>
<Caret Line="74" Column="24" TopLine="57"/>
</Position4>
<Position5>
<Filename Value="unit1.pas"/>
<Caret Line="194" TopLine="175"/>
<Caret Line="81" Column="49" TopLine="75"/>
</Position5>
<Position6>
<Filename Value="unit1.pas"/>
<Caret Line="184" Column="3" TopLine="177"/>
<Caret Line="82" Column="49" TopLine="76"/>
</Position6>
<Position7>
<Filename Value="unit1.pas"/>
<Caret Line="161" TopLine="157"/>
<Caret Line="83" Column="49" TopLine="77"/>
</Position7>
<Position8>
<Filename Value="unit1.pas"/>
<Caret Line="189" Column="6" TopLine="179"/>
<Caret Line="4" Column="45"/>
</Position8>
<Position9>
<Filename Value="unit1.pas"/>
<Caret Line="74" Column="24" TopLine="57"/>
<Caret Line="110" Column="116" TopLine="88"/>
</Position9>
<Position10>
<Filename Value="unit1.pas"/>
<Caret Line="81" Column="49" TopLine="75"/>
<Caret Line="111" Column="35" TopLine="94"/>
</Position10>
<Position11>
<Filename Value="unit1.pas"/>
<Caret Line="82" Column="49" TopLine="76"/>
<Caret Line="188" Column="17" TopLine="176"/>
</Position11>
<Position12>
<Filename Value="unit1.pas"/>
<Caret Line="83" Column="49" TopLine="77"/>
<Caret Line="180" Column="19" TopLine="172"/>
</Position12>
<Position13>
<Filename Value="unit1.pas"/>
<Caret Line="4" Column="45"/>
<Caret Line="154" Column="3" TopLine="152"/>
</Position13>
<Position14>
<Filename Value="unit1.pas"/>
<Caret Line="110" Column="116" TopLine="88"/>
<Caret Line="170" Column="3" TopLine="168"/>
</Position14>
<Position15>
<Filename Value="unit1.pas"/>
<Caret Line="111" Column="35" TopLine="94"/>
<Caret Line="158" Column="54" TopLine="113"/>
</Position15>
<Position16>
<Filename Value="unit1.pas"/>
<Caret Line="188" Column="17" TopLine="176"/>
<Caret Line="108" Column="51" TopLine="91"/>
</Position16>
<Position17>
<Filename Value="unit1.pas"/>
<Caret Line="180" Column="19" TopLine="172"/>
<Caret Line="153" Column="12" TopLine="150"/>
</Position17>
<Position18>
<Filename Value="unit1.pas"/>
<Caret Line="154" Column="3" TopLine="152"/>
<Caret Line="152" TopLine="138"/>
</Position18>
<Position19>
<Filename Value="unit1.pas"/>
<Caret Line="170" Column="3" TopLine="168"/>
<Caret Line="173" Column="3" TopLine="106"/>
</Position19>
<Position20>
<Filename Value="unit1.pas"/>
<Caret Line="158" Column="54" TopLine="113"/>
<Caret Line="124" Column="7" TopLine="101"/>
</Position20>
<Position21>
<Filename Value="unit1.pas"/>
<Caret Line="108" Column="51" TopLine="91"/>
<Caret Line="187" Column="3" TopLine="184"/>
</Position21>
<Position22>
<Filename Value="unit1.pas"/>
<Caret Line="153" Column="12" TopLine="150"/>
<Caret Line="123" Column="47" TopLine="108"/>
</Position22>
<Position23>
<Filename Value="unit1.pas"/>
<Caret Line="152" TopLine="138"/>
<Caret Line="143" TopLine="127"/>
</Position23>
<Position24>
<Filename Value="unit1.pas"/>
<Caret Line="173" Column="3" TopLine="106"/>
<Caret Line="72" Column="36" TopLine="63"/>
</Position24>
<Position25>
<Filename Value="unit1.pas"/>
<Caret Line="124" Column="7" TopLine="101"/>
<Caret Line="163" TopLine="150"/>
</Position25>
<Position26>
<Filename Value="unit1.pas"/>
<Caret Line="187" Column="3" TopLine="184"/>
<Caret Column="14"/>
</Position26>
<Position27>
<Filename Value="unit1.pas"/>
<Caret Line="123" Column="47" TopLine="108"/>
<Caret Line="209" Column="19" TopLine="195"/>
</Position27>
<Position28>
<Filename Value="unit1.pas"/>
<Caret Line="143" TopLine="127"/>
<Caret Line="210" Column="42" TopLine="196"/>
</Position28>
<Position29>
<Filename Value="unit1.pas"/>
<Caret Line="72" Column="36" TopLine="63"/>
<Caret Line="125" Column="15" TopLine="112"/>
</Position29>
<Position30>
<Filename Value="unit1.pas"/>
<Caret Line="163" TopLine="150"/>
<Caret Line="122" Column="73" TopLine="93"/>
</Position30>
</JumpHistory>
<RunParams>
Expand Down
4 changes: 2 additions & 2 deletions pchanger/backup/unit1.lfm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
object MainForm: TMainForm
Left = 693
Left = 285
Height = 736
Top = 42
Top = 96
Width = 1000
ActiveControl = ListBox1
Caption = 'Plymouth Changer'
Expand Down
27 changes: 18 additions & 9 deletions pchanger/backup/unit1.pas
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ procedure TMainForm.StartProcess(command, terminal: string);
ExProcess: TProcess;
begin
Screen.Cursor := crHourGlass;
Application.ProcessMessages;
ExProcess := TProcess.Create(nil);
try
ExProcess.Executable := terminal; //sh или xterm
Expand All @@ -119,14 +120,17 @@ procedure TMainForm.StartProcess(command, terminal: string);
begin
ExProcess.Parameters.Add('-c');
ExProcess.Parameters.Add(command);
ExProcess.Options := ExProcess.Options + [poWaitOnExit, poUsePipes, poNoConsole];
ExProcess.Options := ExProcess.Options + [poWaitOnExit, poUsePipes];
ExProcess.Execute;

//Обнвление списка тем
ListBox1.Items.LoadFromStream(ExProcess.Output);
ListBox1.Update;
if ListBox1.Count > 0 then
ListBox1.ItemIndex := 0;
if Pos('--show-splash', command) = 0 then
begin
//Обнвление списка тем
ListBox1.Items.LoadFromStream(ExProcess.Output);
ListBox1.Update;
if ListBox1.Count > 0 then
ListBox1.ItemIndex := 0;
end;
end;

finally
Expand Down Expand Up @@ -160,7 +164,7 @@ procedure TMainForm.FormShow(Sender: TObject);
begin
XMLPropStorage1.Restore;
MainForm.Caption := Application.Title;
ScrollBox1.Width:=Image8.Left + Image8.Width + 25;
ScrollBox1.Width := Image8.Left + Image8.Width + 30;
end;

//Поиск в списке по клику на картинке
Expand Down Expand Up @@ -201,10 +205,15 @@ procedure TMainForm.ViewBtnClick(Sender: TObject);
MessageDlg(SViewPlymouthTheme, mtInformation, [mbOK], 0);
end;

StartProcess('sh -c "echo ' + '''' + 'Preparing Plymouth theme...' +
{ StartProcess('sh -c "echo ' + '''' + 'Preparing Plymouth theme...' +
'''' + '; plymouth-set-default-theme ' + ListBox1.Items[ListBox1.ItemIndex] +
'; plymouthd; plymouth --show-splash; for ((I=0; I<10; I++)); do plymouth --update=test$I; '
+ 'sleep 1; done; plymouth quit"', 'xterm');
+ 'sleep 1; done; plymouth quit"', 'xterm');}

StartProcess('plymouth-set-default-theme ' + ListBox1.Items[ListBox1.ItemIndex] +
'; plymouthd; plymouth --show-splash; for ((I=0; I<10; I++)); do plymouth --update=test$I; '
+ 'sleep 1; done; plymouth quit', 'sh');

end;

procedure TMainForm.FormCreate(Sender: TObject);
Expand Down
Binary file modified pchanger/lib/x86_64-linux/pchanger.or
Binary file not shown.
4 changes: 2 additions & 2 deletions pchanger/lib/x86_64-linux/unit1.lfm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
object MainForm: TMainForm
Left = 693
Left = 288
Height = 736
Top = 42
Top = 88
Width = 1000
ActiveControl = ListBox1
Caption = 'Plymouth Changer'
Expand Down
Binary file modified pchanger/lib/x86_64-linux/unit1.o
Binary file not shown.
Binary file modified pchanger/lib/x86_64-linux/unit1.ppu
Binary file not shown.
Binary file modified pchanger/pchanger
Binary file not shown.
Loading

0 comments on commit 53322d4

Please sign in to comment.