Skip to content
Snippets Groups Projects

improved design of distractions page; improved combobox (now listbox + popup)

3 files
+ 106
59
Compare changes
  • Side-by-side
  • Inline

Files

@@ -41,7 +41,7 @@
@@ -41,7 +41,7 @@
Background="Transparent"
Background="Transparent"
Foreground="{StaticResource TEXT_PRIMARY_BRUSH}"
Foreground="{StaticResource TEXT_PRIMARY_BRUSH}"
BorderBrush="{StaticResource TEXT_SECONDARY_BRUSH}"
BorderBrush="{StaticResource TEXT_SECONDARY_BRUSH}"
BorderThickness="1"
BorderThickness="0"
TextChanged="SearchBox_TextChanged" />
TextChanged="SearchBox_TextChanged" />
<TextBlock x:Name="SearchPlaceholder"
<TextBlock x:Name="SearchPlaceholder"
Text="Search..."
Text="Search..."
@@ -53,6 +53,13 @@
@@ -53,6 +53,13 @@
IsHitTestVisible="False"
IsHitTestVisible="False"
Margin="15,0,0,0" />
Margin="15,0,0,0" />
 
<!-- Untere Linie als Border -->
 
<Border Height="1"
 
Background="{StaticResource TEXT_PRIMARY_BRUSH}"
 
VerticalAlignment="Bottom"
 
HorizontalAlignment="Stretch"
 
Margin="10,0,40,0" />
 
<Border Width="30"
<Border Width="30"
Height="30"
Height="30"
Margin="165,0,0,0"
Margin="165,0,0,0"
@@ -62,15 +69,14 @@ MouseDown="SearchButton_Click">
@@ -62,15 +69,14 @@ MouseDown="SearchButton_Click">
<TextBlock Text="🔍"
<TextBlock Text="🔍"
FontSize="14"
FontSize="14"
VerticalAlignment="Center"
VerticalAlignment="Center"
HorizontalAlignment="Center" />
HorizontalAlignment="Center"
 
Style="{StaticResource ButtonTextStyle2}"/>
 
</Border>
</Border>
</Grid>
</Grid>
<!-- Lupe-Symbol -->
</Border>
</Border>
@@ -88,20 +94,17 @@ MouseDown="SearchButton_Click">
@@ -88,20 +94,17 @@ MouseDown="SearchButton_Click">
<Border Background="{StaticResource BACKGROUND_SECONDARY_BRUSH}" CornerRadius="10" Padding="10" Margin="0,10,0,0">
<Border Background="{StaticResource BACKGROUND_SECONDARY_BRUSH}" CornerRadius="10" Padding="10" Margin="0,10,0,0">
<Grid>
<Grid>
<Grid.ColumnDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="3*" />
<ColumnDefinition Width="3*" />
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="5*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="3*" />
 
<ColumnDefinition Width="1*" />
</Grid.ColumnDefinitions>
</Grid.ColumnDefinitions>
<!-- Label -->
<!-- Label -->
<TextBlock Text="Add a distracting website:"
<TextBlock Text="Add a distracting website:"
VerticalAlignment="Center"
VerticalAlignment="Center"
Foreground="White"
Margin="10,0,10,0"
FontSize="14"
Style="{StaticResource Header3}"/>
FontWeight="Bold"
Grid.Column="0"
Margin="10,0,10,0" />
<!-- Input Field with Placeholder -->
<!-- Input Field with Placeholder -->
<Grid Grid.Column="1" VerticalAlignment="Center" Margin="0,0,10,0">
<Grid Grid.Column="1" VerticalAlignment="Center" Margin="0,0,10,0">
@@ -112,7 +115,7 @@ MouseDown="SearchButton_Click">
@@ -112,7 +115,7 @@ MouseDown="SearchButton_Click">
Background="Transparent"
Background="Transparent"
Foreground="White"
Foreground="White"
BorderBrush="Gray"
BorderBrush="Gray"
BorderThickness="1"
BorderThickness="0"
TextChanged="UrlInputBox_TextChanged" />
TextChanged="UrlInputBox_TextChanged" />
<TextBlock x:Name="UrlPlaceholder"
<TextBlock x:Name="UrlPlaceholder"
Text="Url"
Text="Url"
@@ -122,51 +125,55 @@ MouseDown="SearchButton_Click">
@@ -122,51 +125,55 @@ MouseDown="SearchButton_Click">
Padding="5"
Padding="5"
IsHitTestVisible="False"
IsHitTestVisible="False"
Margin="5,0,0,0" />
Margin="5,0,0,0" />
 
 
<!-- Untere Linie als Border -->
 
<Border Height="1"
 
Background="{StaticResource TEXT_PRIMARY_BRUSH}"
 
VerticalAlignment="Bottom"
 
HorizontalAlignment="Stretch"
 
Margin="0,0,0,0" />
</Grid>
</Grid>
<!-- Dropdown for Category -->
<StackPanel Grid.Column="2" VerticalAlignment="Center" Margin="0,0,10,0" HorizontalAlignment="Center" Width="200">
<StackPanel Grid.Column="2" VerticalAlignment="Center" Margin="0,0,10,0">
<TextBlock Text="Category" HorizontalAlignment="Left" Margin="0,0,0,5" Style="{StaticResource Header3}"/>
<TextBlock Text="Category"
HorizontalAlignment="Left"
<!-- Button zum Öffnen des Dropdowns -->
Foreground="White"
<Border Name="DropdownBorder" Background="{StaticResource HIGHLIGHT_PRIMARY_BRUSH}" CornerRadius="5" BorderThickness="1" BorderBrush="Black"
FontSize="14"
Width="200" MouseDown="TogglePopup">
FontWeight="Bold"
<Grid>
Margin="0,0,0,5" />
<TextBlock x:Name="SelectedText" Text="Select Category" Foreground="{StaticResource BACKGROUND_PRIMARY_BRUSH}" FontWeight="Bold" VerticalAlignment="Center" Margin="10,0,30,0"/>
<ComboBox VerticalAlignment="Center"
<Path Fill="{StaticResource BACKGROUND_PRIMARY_BRUSH}" Data="M 0 0 L 8 8 L 16 0 Z" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="10"/>
x:Name="CategoryComboBox"
</Grid>
Padding="5"
</Border>
FontSize="14"
Foreground="Black"
<!-- Popup für die Dropdown-Liste -->
Background="#ADD8E6"
<Popup Name="PopupMenu" Placement="Bottom" StaysOpen="True" Width="200">
FontWeight="Bold"
<Border Background="{StaticResource HIGHLIGHT_PRIMARY_BRUSH}" CornerRadius="5" BorderThickness="1" BorderBrush="Black" Width="200">
SelectedIndex="4">
<ListBox x:Name="CategoryList" SelectionChanged="CategoryList_SelectionChanged" Background="{StaticResource HIGHLIGHT_PRIMARY_BRUSH}">
<ListBoxItem Content="Social Media"/>
<ComboBoxItem Content="Social Media" />
<ListBoxItem Content="Shopping"/>
<ComboBoxItem Content="Shopping" />
<ListBoxItem Content="Games"/>
<ComboBoxItem Content="Games" />
<ListBoxItem Content="Porn"/>
<ComboBoxItem Content="Porn" />
<ListBoxItem Content="Other Websites" />
<ComboBoxItem Content="Other Websites" />
</ListBox>
</ComboBox>
</Border>
 
</Popup>
</StackPanel>
</StackPanel>
<!-- Add Button -->
<Button Width="30"
Height="30"
VerticalAlignment="Center"
HorizontalAlignment="Right"
Grid.Column="3"
<!-- Add Button als Border -->
Margin="0"
<Border Width="40" Height="40" CornerRadius="10" Background="{StaticResource TEXT_PRIMARY_BRUSH}" Cursor="Hand"
BorderThickness="0"
Grid.Column="3"
ToolTip="Add"
VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10,0,0,0"
Click="AddButton_Click">
MouseDown="AddButton_Click">
<TextBlock Text="+"
<TextBlock Text="+" FontSize="24" FontWeight="Bold" Foreground="Black"
FontSize="20"
VerticalAlignment="Center" HorizontalAlignment="Center"/>
Foreground="#333436"
</Border>
VerticalAlignment="Center"
HorizontalAlignment="Center"
/>
</Button>
</Grid>
</Grid>
</Border>
</Border>
@@ -273,14 +280,14 @@ MouseDown="SearchButton_Click">
@@ -273,14 +280,14 @@ MouseDown="SearchButton_Click">
</StackPanel>
</StackPanel>
<!-- Pagination -->
<!-- Pagination -->
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,520,0,0" VerticalAlignment="Top">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,550,0,0" VerticalAlignment="Top">
<Border Style="{StaticResource RoundedButtonBorder}" MouseDown="PreviousPage_Click" Width="100" Margin="10">
<Border Style="{StaticResource RoundedButtonBorder}" MouseDown="PreviousPage_Click" Width="100" Margin="10">
<TextBlock Text="Previous" Style="{StaticResource ButtonTextStyle}" />
<TextBlock Text="Previous" Style="{StaticResource ButtonTextStyle}" />
</Border>
</Border>
<StackPanel Orientation="Horizontal">
<StackPanel Orientation="Horizontal">
<Ellipse Width="15" Height="15" Fill="Black" Margin="5"/>
<Ellipse Width="15" Height="15" Fill="{StaticResource TEXT_PRIMARY_BRUSH}" Margin="5"/>
<!-- Aktive Seite -->
<!-- Aktive Seite -->
<Ellipse Width="15" Height="15" Fill="Black" Margin="5"/>
<Ellipse Width="15" Height="15" Fill="{StaticResource TEXT_PRIMARY_BRUSH}" Margin="5"/>
<!-- Inaktive Seite -->
<!-- Inaktive Seite -->
<Ellipse Width="15" Height="15" Fill="Gray" Margin="5"/>
<Ellipse Width="15" Height="15" Fill="Gray" Margin="5"/>
<Ellipse Width="15" Height="15" Fill="Gray" Margin="5"/>
<Ellipse Width="15" Height="15" Fill="Gray" Margin="5"/>
Loading