mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-21 17:28:00 +02:00
Initial checkin
This commit is contained in:
parent
c74712dad9
commit
078564ac9e
3242 changed files with 1616395 additions and 0 deletions
32
IDE/src/ui/SingleLineEditWidget.bf
Normal file
32
IDE/src/ui/SingleLineEditWidget.bf
Normal file
|
@ -0,0 +1,32 @@
|
|||
using Beefy.theme.dark;
|
||||
|
||||
namespace IDE.ui
|
||||
{
|
||||
class SingleLineEditWidgetContent : DarkEditWidgetContent
|
||||
{
|
||||
public this()
|
||||
{
|
||||
SetFont(DarkTheme.sDarkTheme.mSmallFont, false, false);
|
||||
mTextInsets.Set(GS!(1), GS!(2), 0, GS!(2));
|
||||
}
|
||||
|
||||
public override float GetLineHeight(int line)
|
||||
{
|
||||
return GS!(21);
|
||||
}
|
||||
}
|
||||
|
||||
class SingleLineEditWidget : DarkEditWidget
|
||||
{
|
||||
public this()
|
||||
: base(new SingleLineEditWidgetContent())
|
||||
{
|
||||
mScrollContentInsets.Set(GS!(2), GS!(3), GS!(2), GS!(3));
|
||||
}
|
||||
|
||||
public void ResizeAround(float targetX, float targetY, float width)
|
||||
{
|
||||
Resize(targetX - GS!(1), targetY - GS!(1), width + GS!(2), GS!(23));
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue