Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make minor improvements to the ui #2979

Merged
merged 1 commit into from
Dec 1, 2024
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 @@ -1063,10 +1063,8 @@ class PagerActivity : AppCompatActivity(), AudioBarListener, OnBookmarkTagsUpdat

public override fun onPause() {
foregroundDisposable.clear()
if (promptDialog != null) {
promptDialog!!.dismiss()
promptDialog = null
}
promptDialog?.dismiss()
promptDialog = null
recentPagePresenter.unbind()
quranSettings.wasShowingTranslation = pagerAdapter.isShowingTranslation

Expand Down
6 changes: 0 additions & 6 deletions app/src/main/res/layout/quran_page_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,6 @@
android:visibility="gone"
/>
</androidx.appcompat.widget.Toolbar>

<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/toolbar_shadow"
android:layout_gravity="bottom" />
</FrameLayout>

<com.quran.mobile.feature.audiobar.AudioBarWrapper
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-night/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@
<color name="toolbar_text">#ffffffff</color>
<color name="toolbar_icon_tint">#ffffffff</color>
<color name="toolbar_secondary_text">#ffffffff</color>
<color name="toolbar_shadow">#ff36343a</color>
</resources>
1 change: 0 additions & 1 deletion app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<color name="toolbar_text">#ff44464e</color>
<color name="toolbar_icon_tint">#ff44464e</color>
<color name="toolbar_secondary_text">#ff44464e</color>
<color name="toolbar_shadow">#ffe4e4e7</color>

<color name="dark_background">#ff212121</color>
<color name="secondary_dark_background">#ff303030</color>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ class AudioBarWrapper @JvmOverloads constructor(
.only(WindowInsetsSides.Horizontal.plus(WindowInsetsSides.Bottom))
.asPaddingValues()
)
.padding(top = 8.dp)
.padding(horizontal = 16.dp)
.height(dimensionResource(id = R.dimen.audiobar_height))
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ package com.quran.mobile.feature.audiobar.ui
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.IntrinsicSize
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.layout.padding
import androidx.compose.material.icons.filled.Close
import androidx.compose.material3.Divider
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.LinearProgressIndicator
Expand All @@ -17,7 +16,7 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import com.quran.labs.androidquran.common.ui.core.QuranIcons
import com.quran.labs.androidquran.common.ui.core.QuranTheme
import com.quran.mobile.feature.audiobar.state.AudioBarState
Expand Down Expand Up @@ -66,17 +65,20 @@ internal fun ProgressAudioBar(
Icon(QuranIcons.Close, contentDescription = stringResource(id = android.R.string.cancel))
}

Divider(
modifier = Modifier
.fillMaxHeight()
.width(Dp.Hairline)
)

Column {
Column(modifier = Modifier.weight(1f)) {
if (progress == -1) {
LinearProgressIndicator()
LinearProgressIndicator(
modifier = Modifier.fillMaxWidth()
.padding(end = 8.dp)
)
} else {
LinearProgressIndicator(progress = progress.toFloat() / 100f)
LinearProgressIndicator(
progress = { progress.toFloat() / 100f },
gapSize = 0.dp,
drawStopIndicator = {},
modifier = Modifier.fillMaxWidth()
.padding(end = 8.dp)
)
}

Text(text = stringResource(id = messageResource))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ fun QuranPageWrapper(
val adjustedBrightness = (50 * ln1p(backgroundBrightness.toDouble()) + originalTextBrightness).toInt()
val textBrightness = min(adjustedBrightness.toFloat(), 255f)

val overlayColor = Color(0x50, 0x50, 0x50)
val overlayColor = Color(0x60, 0x60, 0x60)

val displayInfo = pageInfo.displayText
val showHeaderFooter = displaySettings.showHeaderFooter
Expand Down