Skip to content

Commit

Permalink
Update the curved mode on exiting fullscreen
Browse files Browse the repository at this point in the history
Window view model's isCurved property was not properly updated when
exiting fullscreen. When entering fullscreen it's updated because
placeWindow() is called. However on unfullscreen placeWindow() is
not called so the isCurved property was not updated. The solution
is to call updateCurvedMode when entering/exiting fullscreen.
  • Loading branch information
svillar committed Dec 3, 2024
1 parent fee251a commit 1890d23
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
11 changes: 6 additions & 5 deletions app/src/common/shared/com/igalia/wolvic/ui/widgets/Windows.java
Original file line number Diff line number Diff line change
Expand Up @@ -1393,17 +1393,18 @@ public void onContentFullScreen(@NonNull WindowWidget aWindow, boolean aFullScre
for (WindowWidget win: getCurrentWindows()) {
setWindowVisible(win, win == mFullscreenWindow);
}
updateMaxWindowScales();
updateViews();
} else if (mFullscreenWindow != null) {
} else {
if (mFullscreenWindow == null)
return;
aWindow.restoreBeforeFullscreenPlacement();
mFullscreenWindow = null;
for (WindowWidget win : getCurrentWindows()) {
setWindowVisible(win, true);
}
updateMaxWindowScales();
updateViews();
}
updateMaxWindowScales();
updateCurvedMode(true);

}

@Override
Expand Down
4 changes: 0 additions & 4 deletions app/src/main/res/drawable/rounded_line.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,20 @@
<solid android:color="@color/ocean" />
<corners android:radius="5dp" />
<size android:height="5dp" />
<!-- 50% opacity @color/asphalt -->

</shape>
</item>
<item android:state_hovered="true">
<shape>
<solid android:color="@color/azure" />
<corners android:radius="5dp" />
<size android:height="5dp" />

</shape>
</item>
<item>
<shape>
<solid android:color="@color/fog" />
<corners android:radius="5dp" />
<size android:height="5dp" />

</shape>
</item>
</selector>
1 change: 1 addition & 0 deletions app/src/main/res/layout/navigation_bar_navigation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@
android:layout_height="8dp"
android:layout_gravity="center"
android:background="@drawable/rounded_line"
android:duplicateParentState="true"
android:radius="4dp" />
</FrameLayout>

Expand Down

0 comments on commit 1890d23

Please sign in to comment.