Skip to content

Commit

Permalink
added move from left bottom corner
Browse files Browse the repository at this point in the history
  • Loading branch information
kaii-lb committed Apr 1, 2024
1 parent fd1f178 commit 7bb1fd5
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 48 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ class AppWindow(val context: Context, private val densityDpi: Int, private val f
binding.ibClose.imageTintList = ColorStateList.valueOf(onStateBar)

val navigationBarColor = taskDescription.backgroundColor
// binding.rlButton.setBackgroundColor(navigationBarColor)
binding.rlButton.setBackgroundColor(navigationBarColor)
val onNavigationBar = if (MaterialColors.isColorLight(ColorUtils.compositeColors(navigationBarColor, backgroundColor)) xor ((context.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES)) {
context.theme.getAttr(com.google.android.material.R.attr.colorOnPrimaryContainer).data
} else {
Expand Down
13 changes: 8 additions & 5 deletions app/src/main/res/layout/activity_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@
style="@style/Widget.Material3.Button.OutlinedButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="number" />
android:inputType="number"
android:textColor="?attr/colorOnSurface"/>
</LinearLayout>

<com.google.android.material.materialswitch.MaterialSwitch
Expand Down Expand Up @@ -137,7 +138,8 @@
android:id="@+id/btn_windowsfy"
style="@style/Widget.Material3.Button.OutlinedButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
android:layout_height="wrap_content"
android:textColor="?attr/colorOnSurface" />
</LinearLayout>

<LinearLayout
Expand All @@ -159,7 +161,8 @@
android:id="@+id/btn_surface"
style="@style/Widget.Material3.Button.OutlinedButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:textColor="?attr/colorOnSurface"/>
</LinearLayout>

<com.google.android.material.materialswitch.MaterialSwitch
Expand Down Expand Up @@ -230,7 +233,7 @@
style="@style/Widget.Material3.CardView.Elevated"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="* Launcher might need to be restarted twice for hooks to take effect"
/>
android:paddingBottom="40dp"
android:text="* Launcher might need to be restarted twice for hooks to take effect" />
</LinearLayout>
</ScrollView>
27 changes: 15 additions & 12 deletions app/src/main/res/layout/window_app.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
style="@style/Widget.Material3.CardView.Elevated"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:cardBackgroundColor="#171717"
app:cardBackgroundColor="?attr/colorSurfaceContainer"
app:cardCornerRadius="@dimen/app_card_radius"
app:cardElevation="4dp">

Expand All @@ -39,33 +39,36 @@
android:layout_height="15dp"
android:layout_below="@id/surface"
android:layout_alignEnd="@id/surface"
android:layout_alignParentStart="true">
android:layout_alignParentStart="true"
app:cardBackgroundColor="?attr/colorSurfaceContainer">

<ImageButton
android:id="@+id/ib_resize"
android:layout_width="match_parent"
android:layout_width="100dp"
android:layout_height="match_parent"
android:layout_alignParentEnd="true"
android:background="@null"
android:contentDescription="@string/resize_desc" />

</RelativeLayout>

<RelativeLayout
android:id="@+id/rl_top"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_alignEnd="@id/surface"
android:paddingHorizontal="6dp">
android:paddingHorizontal="6dp"
app:cardBackgroundColor="?attr/colorSurfaceContainer">

<ImageButton
android:id="@+id/ib_back"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_centerVertical="true"
android:background="?android:attr/selectableItemBackground"
android:contentDescription="@string/back_desc"
android:padding="4dp"
android:src="@drawable/ic_back"
android:contentDescription="@string/back_desc" />
android:src="@drawable/ic_back" />

<ImageButton
android:id="@+id/ib_minimize"
Expand All @@ -74,9 +77,9 @@
android:layout_centerVertical="true"
android:layout_toStartOf="@id/ib_fullscreen"
android:background="?android:attr/selectableItemBackground"
android:contentDescription="@string/minimize_desc"
android:padding="4dp"
android:src="@drawable/ic_minimize"
android:contentDescription="@string/minimize_desc" />
android:src="@drawable/ic_minimize" />

<ImageButton
android:id="@+id/ib_fullscreen"
Expand All @@ -86,9 +89,9 @@
android:layout_marginStart="4dp"
android:layout_toStartOf="@id/ib_close"
android:background="?android:attr/selectableItemBackground"
android:contentDescription="@string/fullscreen_desc"
android:padding="4dp"
android:src="@drawable/ic_maximize"
android:contentDescription="@string/fullscreen_desc" />
android:src="@drawable/ic_maximize" />

<ImageButton
android:id="@+id/ib_close"
Expand All @@ -97,8 +100,8 @@
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:background="?android:attr/selectableItemBackground"
android:src="@drawable/ic_close_24"
android:contentDescription="@string/close_desc" />
android:contentDescription="@string/close_desc"
android:src="@drawable/ic_close_24" />
</RelativeLayout>
</RelativeLayout>
</com.google.android.material.card.MaterialCardView>
Expand Down
4 changes: 0 additions & 4 deletions app/src/main/res/xml/floating_window_service.xml

This file was deleted.

0 comments on commit 7bb1fd5

Please sign in to comment.