-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve customization of scrollbar & toolbar.
- Loading branch information
Showing
25 changed files
with
801 additions
and
358 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
Author: Raymond van Venetië and Merlijn Wajer | ||
Project: Simba (https://github.com/MerlijnWajer/Simba) | ||
License: GNU General Public License (https://www.gnu.org/licenses/gpl-3.0) | ||
} | ||
unit simba.component_scrollbar; | ||
|
||
{$i simba.inc} | ||
|
||
interface | ||
|
||
uses | ||
Classes, SysUtils, | ||
ATScrollBar, simba.settings; | ||
|
||
type | ||
TSimbaScrollBar = class(TATScrollBar) | ||
protected | ||
procedure DoSettingChange_ScrollBarSize(Setting: TSimbaSetting); | ||
procedure DoSettingChange_ScrollBarArrowSize(Setting: TSimbaSetting); | ||
public | ||
constructor Create(AOwner: TComponent); override; | ||
end; | ||
|
||
implementation | ||
|
||
uses | ||
simba.mufasatypes; | ||
|
||
procedure TSimbaScrollBar.DoSettingChange_ScrollBarSize(Setting: TSimbaSetting); | ||
begin | ||
Theme^.InitialSize := Scale96ToScreen(Setting.Value); | ||
|
||
Update(); | ||
end; | ||
|
||
procedure TSimbaScrollBar.DoSettingChange_ScrollBarArrowSize(Setting: TSimbaSetting); | ||
begin | ||
Theme^.ArrowSize := Setting.Value; | ||
|
||
Update(); | ||
end; | ||
|
||
constructor TSimbaScrollBar.Create(AOwner: TComponent); | ||
begin | ||
inherited Create(AOwner); | ||
|
||
SimbaSettings.RegisterChangeHandler(Self, SimbaSettings.General.ScrollBarSize, @DoSettingChange_ScrollBarSize, True); | ||
SimbaSettings.RegisterChangeHandler(Self, SimbaSettings.General.ScrollBarArrowSize, @DoSettingChange_ScrollBarArrowSize, True); | ||
end; | ||
|
||
end. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.