mirror of
https://github.com/logseq/logseq.git
synced 2026-04-24 22:25:01 +00:00
enhance(mobile): polish UI spacing and background styling in various components
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package com.logseq.app
|
package com.logseq.app
|
||||||
|
|
||||||
import android.graphics.Color
|
import android.graphics.Color
|
||||||
|
import android.graphics.drawable.GradientDrawable
|
||||||
import android.os.Handler
|
import android.os.Handler
|
||||||
import android.os.Looper
|
import android.os.Looper
|
||||||
import android.view.View
|
import android.view.View
|
||||||
@@ -50,9 +51,27 @@ class NativeBottomSheetPlugin : Plugin() {
|
|||||||
ViewGroup.LayoutParams.MATCH_PARENT
|
ViewGroup.LayoutParams.MATCH_PARENT
|
||||||
)
|
)
|
||||||
|
|
||||||
|
val cornerRadius = NativeUiUtils.dp(ctx, 16f).toFloat()
|
||||||
|
val roundedBackground = GradientDrawable().apply {
|
||||||
|
setColor(LogseqTheme.current().background)
|
||||||
|
cornerRadii = floatArrayOf(
|
||||||
|
cornerRadius, cornerRadius, // 左上角
|
||||||
|
cornerRadius, cornerRadius, // 右上角
|
||||||
|
0f, 0f, // 右下角
|
||||||
|
0f, 0f // 左下角
|
||||||
|
)
|
||||||
|
}
|
||||||
|
container!!.background = roundedBackground
|
||||||
|
container!!.clipToOutline = true
|
||||||
|
|
||||||
val sheet = BottomSheetDialog(ctx)
|
val sheet = BottomSheetDialog(ctx)
|
||||||
sheet.setContentView(container!!)
|
sheet.setContentView(container!!)
|
||||||
|
|
||||||
|
sheet.setOnShowListener {
|
||||||
|
val bottomSheet = sheet.findViewById<View>(com.google.android.material.R.id.design_bottom_sheet)
|
||||||
|
bottomSheet?.setBackgroundColor(Color.TRANSPARENT)
|
||||||
|
}
|
||||||
|
|
||||||
WebViewSnapshotManager.showSnapshot(snapshotTag, webView)
|
WebViewSnapshotManager.showSnapshot(snapshotTag, webView)
|
||||||
|
|
||||||
// Move the WebView into the BottomSheet container
|
// Move the WebView into the BottomSheet container
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import android.view.Gravity
|
|||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.widget.FrameLayout
|
import android.widget.FrameLayout
|
||||||
|
import androidx.compose.foundation.BorderStroke
|
||||||
import androidx.compose.foundation.clickable
|
import androidx.compose.foundation.clickable
|
||||||
import androidx.compose.foundation.horizontalScroll
|
import androidx.compose.foundation.horizontalScroll
|
||||||
import androidx.compose.foundation.layout.Arrangement
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
@@ -205,8 +206,8 @@ private fun SelectionActionBar(
|
|||||||
|
|
||||||
Surface(
|
Surface(
|
||||||
color = background,
|
color = background,
|
||||||
shadowElevation = 6.dp,
|
shape = RoundedCornerShape(16.dp),
|
||||||
shape = RoundedCornerShape(16.dp)
|
border = BorderStroke(1.dp, tint.copy(alpha = 0.05f))
|
||||||
) {
|
) {
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
.cp__user-login {
|
.cp__user-login {
|
||||||
|
@apply px-1;
|
||||||
|
|
||||||
span.opacity-50, a.opacity-60 {
|
span.opacity-50, a.opacity-60 {
|
||||||
@apply opacity-80;
|
@apply opacity-80;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ html.is-ios textarea,
|
|||||||
html.is-ios input,
|
html.is-ios input,
|
||||||
html.is-ios select,
|
html.is-ios select,
|
||||||
html.is-ios .block-content,
|
html.is-ios .block-content,
|
||||||
html.is-ios .editor-inner,
|
html.is-ios .editor-inner
|
||||||
{
|
{
|
||||||
font-size: inherit;
|
font-size: inherit;
|
||||||
}
|
}
|
||||||
@@ -229,7 +229,7 @@ ul {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.app-popup {
|
.app-popup {
|
||||||
@apply w-full overflow-y-auto overflow-x-hidden;
|
@apply w-full overflow-y-auto overflow-x-hidden px-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-audio-recorder {
|
.app-audio-recorder {
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
(let [username (user-handler/username)
|
(let [username (user-handler/username)
|
||||||
email (user-handler/email)
|
email (user-handler/email)
|
||||||
initial (or (some-> username (subs 0 1) string/upper-case) "?")]
|
initial (or (some-> username (subs 0 1) string/upper-case) "?")]
|
||||||
[:div.pt-4
|
[:div.pt-2
|
||||||
(if-not login?
|
(if-not login?
|
||||||
(shui/button
|
(shui/button
|
||||||
{:variant :default
|
{:variant :default
|
||||||
@@ -112,7 +112,7 @@
|
|||||||
theme-value (if system-theme?
|
theme-value (if system-theme?
|
||||||
"system"
|
"system"
|
||||||
(or theme "system"))]
|
(or theme "system"))]
|
||||||
[:div.app-index-settings.min-h-full.py-4.space-y-4
|
[:div.app-index-settings.min-h-full.space-y-4
|
||||||
(user-profile login?)
|
(user-profile login?)
|
||||||
[:div.space-y-4
|
[:div.space-y-4
|
||||||
[:div.mobile-setting-item
|
[:div.mobile-setting-item
|
||||||
|
|||||||
Reference in New Issue
Block a user