Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,11 @@ public void releaseWidget() {

@Override
protected void initializeWidgetPlacement(WidgetPlacement aPlacement) {
aPlacement.width = WidgetPlacement.dpDimension(getContext(), R.dimen.navigation_bar_width);
aPlacement.worldWidth = WidgetPlacement.floatDimension(getContext(), R.dimen.window_world_width);
aPlacement.width = WidgetPlacement.dpDimension(getContext(), R.dimen.title_bar_width);
float ratio = WidgetPlacement.floatDimension(getContext(), R.dimen.window_world_width) /
WidgetPlacement.dpDimension(getContext(), R.dimen.navigation_bar_width);

aPlacement.worldWidth = aPlacement.width * ratio;
aPlacement.height = WidgetPlacement.dpDimension(getContext(), R.dimen.navigation_bar_height);
aPlacement.anchorX = 0.5f;
aPlacement.anchorY = 1.0f;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,13 @@ public void closeWindow(@NonNull WindowWidget aWindow) {
if (leftWindow == aWindow) {
removeWindow(leftWindow);
if (mFocusedWindow == leftWindow) {
mFocusedWindow = null;
focusWindow(frontWindow);
}
} else if (rightWindow == aWindow) {
removeWindow(rightWindow);
if (mFocusedWindow == rightWindow) {
mFocusedWindow = null;
focusWindow(frontWindow);
}
} else if (frontWindow == aWindow) {
Expand All @@ -254,6 +256,7 @@ public void closeWindow(@NonNull WindowWidget aWindow) {
}

if (mFocusedWindow == frontWindow && !getCurrentWindows().isEmpty()) {
mFocusedWindow = null;
focusWindow(getFrontWindow());
}

Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/values/dimen.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
<dimen name="url_bar_item_width">28dp</dimen>
<dimen name="url_bar_last_item_width">36dp</dimen>

<!-- Title bar -->
<dimen name="title_bar_width">300dp</dimen>

<!-- Keyboard -->
<item name="keyboard_world_width" format="float" type="dimen">3.25</item>
<item name="keyboard_x" format="float" type="dimen">-0.15</item>
Expand Down