Skip to content

Commit

Permalink
fix: a bug when Discover and Program screens appear on the left side …
Browse files Browse the repository at this point in the history
…of the tablet (openedx#269)
  • Loading branch information
dixidroid authored Apr 10, 2024
1 parent 6dd2adf commit 19930a9
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.navigationBarsPadding
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.statusBarsPadding
import androidx.compose.foundation.layout.widthIn
Expand Down Expand Up @@ -241,6 +242,7 @@ internal fun DiscoveryScreen(
horizontal = 16.dp,
vertical = 32.dp,
)
.navigationBarsPadding()
) {
AuthButtonsPanel(
onRegisterClick = onRegisterClick,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.navigationBarsPadding
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.widthIn
import androidx.compose.material.CircularProgressIndicator
Expand Down Expand Up @@ -197,6 +198,7 @@ private fun WebViewDiscoveryScreen(
horizontal = 16.dp,
vertical = 32.dp,
)
.navigationBarsPadding()
) {
AuthButtonsPanel(
onRegisterClick = onRegisterClick,
Expand All @@ -220,7 +222,7 @@ private fun WebViewDiscoveryScreen(
}

Column(
modifier = modifierScreenWidth
modifier = Modifier
.fillMaxSize()
.padding(it)
.statusBarsInset()
Expand All @@ -235,8 +237,8 @@ private fun WebViewDiscoveryScreen(

Surface {
Box(
modifier = Modifier
.fillMaxSize()
modifier = modifierScreenWidth
.fillMaxHeight()
.background(Color.White),
contentAlignment = Alignment.TopCenter
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.navigationBarsPadding
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.widthIn
import androidx.compose.material.CircularProgressIndicator
Expand Down Expand Up @@ -269,7 +270,7 @@ private fun CourseInfoScreen(
}

Column(
modifier = modifierScreenWidth
modifier = Modifier
.fillMaxSize()
.padding(it)
.statusBarsInset()
Expand All @@ -284,9 +285,10 @@ private fun CourseInfoScreen(

Surface {
Box(
modifier = Modifier
.fillMaxSize()
.background(Color.White),
modifier = modifierScreenWidth
.fillMaxHeight()
.background(Color.White)
.navigationBarsPadding(),
contentAlignment = Alignment.TopCenter
) {
if (hasInternetConnection) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ private fun ProgramInfoScreen(
}

Column(
modifier = modifierScreenWidth
modifier = Modifier
.fillMaxSize()
.padding(it)
.statusBarsInset()
Expand All @@ -273,8 +273,8 @@ private fun ProgramInfoScreen(

Surface {
Box(
modifier = Modifier
.fillMaxSize()
modifier = modifierScreenWidth
.fillMaxHeight()
.background(Color.White),
contentAlignment = Alignment.TopCenter
) {
Expand Down

0 comments on commit 19930a9

Please sign in to comment.