-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added toggle for semi-transparent background for text-blocks, enabled per-text block.
- Loading branch information
1 parent
52cf581
commit 4ca595a
Showing
41 changed files
with
496 additions
and
915 deletions.
There are no files selected for viewing
Binary file not shown.
32 changes: 32 additions & 0 deletions
32
GTAWorld Screenshot Editor/Converters/BooleanToSolidColorBrush.cs
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,32 @@ | ||
using System; | ||
using System.Windows.Data; | ||
using System.Windows.Media; | ||
|
||
namespace GTAWorld_Screenshot_Editor.Converters | ||
{ | ||
public class BooleanToSolidColorBrush : IValueConverter | ||
{ | ||
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) | ||
{ | ||
if(value == null) | ||
return Brushes.Transparent; | ||
|
||
var flag = (bool)value; | ||
|
||
if (!flag) return Brushes.Transparent; | ||
|
||
var brush = (SolidColorBrush)new BrushConverter().ConvertFrom("#000"); | ||
|
||
if (brush == null) return Brushes.Transparent; | ||
|
||
brush.Opacity = 0.5; | ||
|
||
return brush; | ||
} | ||
|
||
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) | ||
{ | ||
return Brushes.Transparent; | ||
} | ||
} | ||
} |
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
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.