Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LatinIME
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
keyboard
LatinIME
Commits
484a55f7
Commit
484a55f7
authored
7 months ago
by
Aleksandras Kostarevas
Browse files
Options
Downloads
Patches
Plain Diff
Fix bug with wide screens in languages menu
parent
c9dc656f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
java/src/org/futo/inputmethod/latin/uix/settings/pages/Languages.kt
+69
-48
69 additions, 48 deletions
...rg/futo/inputmethod/latin/uix/settings/pages/Languages.kt
with
69 additions
and
48 deletions
java/src/org/futo/inputmethod/latin/uix/settings/pages/Languages.kt
+
69
−
48
View file @
484a55f7
...
...
@@ -2,6 +2,7 @@ package org.futo.inputmethod.latin.uix.settings.pages
import
androidx.compose.foundation.background
import
androidx.compose.foundation.clickable
import
androidx.compose.foundation.layout.Box
import
androidx.compose.foundation.layout.Column
import
androidx.compose.foundation.layout.Row
import
androidx.compose.foundation.layout.Spacer
...
...
@@ -198,63 +199,83 @@ fun LanguageSurface(
onLayoutAdditionRequested
:
()
->
Unit
,
onLanguageRemoved
:
()
->
Unit
)
{
Column
(
modifier
.
padding
(
start
=
32
.
dp
,
end
=
32
.
dp
)
.
widthIn
(
296
.
dp
,
400
.
dp
)
.
background
(
color
=
MaterialTheme
.
colorScheme
.
surfaceVariant
.
copy
(
alpha
=
0.5f
),
shape
=
RoundedCornerShape
(
size
=
16
.
dp
)
)
.
padding
(
top
=
14
.
dp
,
bottom
=
12
.
dp
)
)
{
CompositionLocalProvider
(
LocalContentColor
provides
MaterialTheme
.
colorScheme
.
onSurfaceVariant
)
{
Text
(
item
.
languageName
,
modifier
=
Modifier
.
padding
(
start
=
16
.
dp
,
end
=
16
.
dp
),
style
=
TextHeadingMediumMlStyle
)
if
(
item
.
options
.
dictionary
==
null
)
{
Tip
(
"This language has no built-in dictionary. We recommend downloading and importing one to get autocorrect and word suggestions."
)
}
else
{
Spacer
(
modifier
=
Modifier
.
height
(
32
.
dp
))
}
Box
(
modifier
=
Modifier
.
fillMaxWidth
(),
contentAlignment
=
Alignment
.
Center
)
{
Column
(
modifier
.
padding
(
start
=
32
.
dp
,
end
=
32
.
dp
)
.
widthIn
(
296
.
dp
,
400
.
dp
)
.
background
(
color
=
MaterialTheme
.
colorScheme
.
surfaceVariant
.
copy
(
alpha
=
0.5f
),
shape
=
RoundedCornerShape
(
size
=
16
.
dp
)
)
.
padding
(
top
=
14
.
dp
,
bottom
=
12
.
dp
)
)
{
CompositionLocalProvider
(
LocalContentColor
provides
MaterialTheme
.
colorScheme
.
onSurfaceVariant
)
{
Text
(
item
.
languageName
,
modifier
=
Modifier
.
padding
(
start
=
16
.
dp
,
end
=
16
.
dp
),
style
=
TextHeadingMediumMlStyle
)
LanguageConfigurable
(
kind
=
FileKind
.
VoiceInput
,
selection
=
item
.
options
.
voiceInputModel
?:
"(None)"
)
{
onConfigurableSelected
(
FileKind
.
VoiceInput
)
}
LanguageConfigurable
(
kind
=
FileKind
.
Dictionary
,
selection
=
item
.
options
.
dictionary
?:
"(None)"
)
{
onConfigurableSelected
(
FileKind
.
Dictionary
)
}
LanguageConfigurable
(
kind
=
FileKind
.
Transformer
,
selection
=
item
.
options
.
transformerModel
?:
"(None)"
)
{
onConfigurableSelected
(
FileKind
.
Transformer
)
}
if
(
item
.
options
.
dictionary
==
null
)
{
Tip
(
"This language has no built-in dictionary. We recommend downloading and importing one to get autocorrect and word suggestions."
)
}
else
{
Spacer
(
modifier
=
Modifier
.
height
(
32
.
dp
))
}
Spacer
(
modifier
=
Modifier
.
height
(
24
.
dp
))
LanguageConfigurable
(
kind
=
FileKind
.
VoiceInput
,
selection
=
item
.
options
.
voiceInputModel
?:
"(None)"
)
{
onConfigurableSelected
(
FileKind
.
VoiceInput
)
}
LanguageConfigurable
(
kind
=
FileKind
.
Dictionary
,
selection
=
item
.
options
.
dictionary
?:
"(None)"
)
{
onConfigurableSelected
(
FileKind
.
Dictionary
)
}
LanguageConfigurable
(
kind
=
FileKind
.
Transformer
,
selection
=
item
.
options
.
transformerModel
?:
"(None)"
)
{
onConfigurableSelected
(
FileKind
.
Transformer
)
}
Spacer
(
modifier
=
Modifier
.
height
(
24
.
dp
))
Text
(
"Keyboard Layouts"
,
modifier
=
Modifier
.
alpha
(
0.75f
)
.
padding
(
start
=
16
.
dp
,
end
=
16
.
dp
),
style
=
TextSmallStyle
)
Text
(
"Keyboard Layouts"
,
modifier
=
Modifier
.
alpha
(
0.75f
)
.
padding
(
start
=
16
.
dp
,
end
=
16
.
dp
),
style
=
TextSmallStyle
)
Spacer
(
modifier
=
Modifier
.
height
(
9
.
dp
))
Spacer
(
modifier
=
Modifier
.
height
(
9
.
dp
))
item
.
layouts
.
forEach
{
LayoutConfigurable
(
name
=
it
,
active
=
true
,
onDelete
=
{
onLayoutRemoved
(
it
)
},
canDelete
=
item
.
layouts
.
size
>
1
)
Spacer
(
modifier
=
Modifier
.
height
(
4
.
dp
))
}
item
.
layouts
.
forEach
{
LayoutConfigurable
(
name
=
it
,
active
=
true
,
onDelete
=
{
onLayoutRemoved
(
it
)
},
canDelete
=
item
.
layouts
.
size
>
1
)
Spacer
(
modifier
=
Modifier
.
height
(
4
.
dp
))
}
Spacer
(
modifier
=
Modifier
.
height
(
21
.
dp
))
Spacer
(
modifier
=
Modifier
.
height
(
21
.
dp
))
ActionableItem
(
icon
=
painterResource
(
id
=
R
.
drawable
.
plus_circle
),
text
=
"Add Keyboard Layout"
,
color
=
MaterialTheme
.
colorScheme
.
primary
,
onTrigger
=
onLayoutAdditionRequested
)
ActionableItem
(
icon
=
painterResource
(
id
=
R
.
drawable
.
plus_circle
),
text
=
"Add Keyboard Layout"
,
color
=
MaterialTheme
.
colorScheme
.
primary
,
onTrigger
=
onLayoutAdditionRequested
)
Spacer
(
modifier
=
Modifier
.
height
(
10
.
dp
))
Spacer
(
modifier
=
Modifier
.
height
(
10
.
dp
))
ActionableItem
(
icon
=
painterResource
(
id
=
R
.
drawable
.
trash
),
text
=
"Remove Language"
,
color
=
MaterialTheme
.
colorScheme
.
error
,
onTrigger
=
onLanguageRemoved
)
ActionableItem
(
icon
=
painterResource
(
id
=
R
.
drawable
.
trash
),
text
=
"Remove Language"
,
color
=
MaterialTheme
.
colorScheme
.
error
,
onTrigger
=
onLanguageRemoved
)
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment