Skip to content

Commit

Permalink
Correção da MainWindow
Browse files Browse the repository at this point in the history
  • Loading branch information
fpedrolucas95 committed Jul 29, 2024
1 parent 8ad7c93 commit 5cf0d10
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 18 deletions.
3 changes: 2 additions & 1 deletion MauiApp1/AdvocaPro.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<GenerateAppInstallerFile>False</GenerateAppInstallerFile>
<AppxPackageSigningEnabled>True</AppxPackageSigningEnabled>
<AppxPackageSigningTimestampDigestAlgorithm>SHA256</AppxPackageSigningTimestampDigestAlgorithm>
<AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision>
<AppxAutoIncrementPackageRevision>False</AppxAutoIncrementPackageRevision>
<AppxPackageDir>C:\Users\fpedr\Documents\AdvocaPro\AppPackages\</AppxPackageDir>
<AppxSymbolPackageEnabled>False</AppxSymbolPackageEnabled>
<GenerateTestArtifacts>True</GenerateTestArtifacts>
Expand All @@ -34,6 +34,7 @@
<SelfContained>true</SelfContained>
<Platforms>x64</Platforms>
<Configurations>Debug;Release;AdvocaPro</Configurations>
<AppxPackageSigningTimestampServerUrl>https://freetsa.org</AppxPackageSigningTimestampServerUrl>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
Expand Down
15 changes: 6 additions & 9 deletions MauiApp1/MauiProgram.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ public static MauiApp CreateMauiApp()
.ConfigureLifecycleEvents(events =>
{
#if WINDOWS
//TODO: [PEDRO] Rever essa lógica em breve pois tem bug
//JANELA PRINCIPAL SEM TITULO E NÃO DIMENSIONAVEL MAS FUNCIONA PARA A TELA DE LOGIN
events.AddWindows(windows =>
{
windows.OnWindowCreated(window =>
Expand All @@ -37,13 +35,12 @@ public static MauiApp CreateMauiApp()
var appWindow = AppWindow.GetFromWindowId(windowId);
var displayArea = DisplayArea.GetFromWindowId(windowId, DisplayAreaFallback.Primary);
var workArea = displayArea.WorkArea;
appWindow.Resize(new SizeInt32(480, 720));
appWindow.Move(new PointInt32((workArea.Width - 480) / 2, (workArea.Height - 720) / 2));
if (appWindow.Presenter is OverlappedPresenter presenter)
{
presenter.IsResizable = false;
presenter.IsMaximizable = false;
}

// Ajusta o tamanho e a posição da janela para não sobrepor a barra de tarefas
var newHeight = Math.Min(720, workArea.Height);
var newWidth = Math.Min(480, workArea.Width);
appWindow.Resize(new SizeInt32(newWidth, newHeight));
appWindow.Move(new PointInt32((workArea.Width - newWidth) / 2, (workArea.Height - newHeight) / 2));
appWindow.Title = "Meu Título Personalizado";
});
});
Expand Down
6 changes: 1 addition & 5 deletions MauiApp1/Platforms/Windows/Package.appxmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap rescap">

<Identity Name="maui-package-name-placeholder" Publisher="CN=fpedrolucas95" Version="0.2.5.0" />
<Identity Name="maui-package-name-placeholder" Publisher="CN=fpedrolucas95" Version="0.2.6.0" />

<mp:PhoneIdentity PhoneProductId="B06C414A-7D45-47A1-B421-E4D925779850" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>

Expand Down Expand Up @@ -41,10 +41,6 @@

<Capabilities>
<rescap:Capability Name="runFullTrust" />
<uap:Capability Name="videosLibrary"/>
<uap:Capability Name="musicLibrary"/>
<uap:Capability Name="picturesLibrary"/>
<uap:Capability Name="documentsLibrary"/>
<rescap:Capability Name="broadFileSystemAccess"/>
</Capabilities>

Expand Down
2 changes: 1 addition & 1 deletion MauiApp1/View/CasesView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

<Entry Grid.Row="1" Grid.ColumnSpan="2" WidthRequest="360" HeightRequest="32" HorizontalOptions="End" VerticalOptions="Center" Placeholder="Pesquisar processos" Text="{Binding SearchText}"/>

<Border Grid.Row="2" Grid.ColumnSpan="{Binding DataGridColumnSpan}" Margin="0,24,0,60" BackgroundColor="{StaticResource EmphasisLow}" Stroke="{StaticResource DarkModeHeader}">
<Border Grid.Row="2" Grid.ColumnSpan="{Binding DataGridColumnSpan}" Margin="0,24" BackgroundColor="{StaticResource EmphasisLow}" Stroke="{StaticResource DarkModeHeader}">
<CollectionView ItemsSource="{Binding Cases}" SelectionMode="Single" SelectedItem="{Binding SelectedCase}">
<CollectionView.Header>
<Grid ColumnDefinitions="350,190,155,190,260,155,110" Padding="8" BackgroundColor="{StaticResource DarkModeHeader}">
Expand Down
2 changes: 1 addition & 1 deletion MauiApp1/View/ClientView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@

<Entry Grid.Row="1" Grid.ColumnSpan="2" WidthRequest="360" HeightRequest="32" HorizontalOptions="End" VerticalOptions="Center" Placeholder="Pesquisar clientes" Text="{Binding SearchText}"/>

<Border Grid.Row="2" Grid.ColumnSpan="{Binding DataGridColumnSpan}" Margin="0,24,0,60" BackgroundColor="{StaticResource EmphasisLow}" Stroke="{StaticResource DarkModeHeader}">
<Border Grid.Row="2" Grid.ColumnSpan="{Binding DataGridColumnSpan}" Margin="0,24" BackgroundColor="{StaticResource EmphasisLow}" Stroke="{StaticResource DarkModeHeader}">
<ScrollView>
<CollectionView ItemsSource="{Binding Clients}" SelectionMode="Single" SelectedItem="{Binding SelectedClient}">
<CollectionView.Header>
Expand Down
2 changes: 1 addition & 1 deletion MauiApp1/View/DeadlineManagementView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

<Entry Grid.Row="1" Grid.ColumnSpan="2" WidthRequest="360" HeightRequest="32" HorizontalOptions="End" VerticalOptions="Center" Placeholder="Pesquisar prazos" Text="{Binding SearchText}"/>

<Border Grid.Row="2" Grid.ColumnSpan="{Binding DataGridColumnSpan}" Margin="0,24,0,60" BackgroundColor="{StaticResource EmphasisLow}" Stroke="{StaticResource DarkModeHeader}">
<Border Grid.Row="2" Grid.ColumnSpan="{Binding DataGridColumnSpan}" Margin="0,24" BackgroundColor="{StaticResource EmphasisLow}" Stroke="{StaticResource DarkModeHeader}">
<CollectionView ItemsSource="{Binding Deadlines}" SelectionMode="Single" SelectedItem="{Binding SelectedDeadline}">
<CollectionView.Header>
<Grid ColumnDefinitions="350,190,110,105,110,85,89,150" Padding="8" BackgroundColor="{StaticResource DarkModeHeader}">
Expand Down

0 comments on commit 5cf0d10

Please sign in to comment.