mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2025-01-30 19:56:44 +01:00
updating the photo editor, use light theme when appropriate
This commit is contained in:
parent
b5dd6c8580
commit
96fb6a0e35
5 changed files with 23 additions and 7 deletions
|
@ -77,7 +77,7 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:7b2ff0b5a0'
|
implementation 'com.github.SimpleMobileTools:Simple-Commons:df1feb973d'
|
||||||
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
|
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
|
||||||
implementation 'it.sephiroth.android.exif:library:1.0.1'
|
implementation 'it.sephiroth.android.exif:library:1.0.1'
|
||||||
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.24'
|
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.24'
|
||||||
|
|
|
@ -7,8 +7,8 @@ import com.simplemobiletools.commons.dialogs.FilePickerDialog
|
||||||
import com.simplemobiletools.commons.extensions.*
|
import com.simplemobiletools.commons.extensions.*
|
||||||
import com.simplemobiletools.commons.helpers.isRPlus
|
import com.simplemobiletools.commons.helpers.isRPlus
|
||||||
import com.simplemobiletools.gallery.pro.R
|
import com.simplemobiletools.gallery.pro.R
|
||||||
import java.io.File
|
|
||||||
import kotlinx.android.synthetic.main.dialog_save_as.view.*
|
import kotlinx.android.synthetic.main.dialog_save_as.view.*
|
||||||
|
import java.io.File
|
||||||
|
|
||||||
class SaveAsDialog(
|
class SaveAsDialog(
|
||||||
val activity: BaseSimpleActivity, val path: String, val appendFilename: Boolean, val cancelCallback: (() -> Unit)? = null,
|
val activity: BaseSimpleActivity, val path: String, val appendFilename: Boolean, val cancelCallback: (() -> Unit)? = null,
|
||||||
|
|
|
@ -235,10 +235,12 @@ class NewPhotoEditActivity : SimpleActivity() {
|
||||||
PhotoEditorBuilder(this)
|
PhotoEditorBuilder(this)
|
||||||
.setSettingsList(settingsList)
|
.setSettingsList(settingsList)
|
||||||
.startActivityForResult(this, PESDK_EDIT_IMAGE)
|
.startActivityForResult(this, PESDK_EDIT_IMAGE)
|
||||||
|
|
||||||
|
settingsList.release()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun createPesdkSettingsList(): PhotoEditorSettingsList {
|
private fun createPesdkSettingsList(): PhotoEditorSettingsList {
|
||||||
val settingsList = PhotoEditorSettingsList().apply {
|
val settingsList = PhotoEditorSettingsList(false).apply {
|
||||||
configure<UiConfigFilter> {
|
configure<UiConfigFilter> {
|
||||||
it.setFilterList(FilterPackBasic.getFilterPack())
|
it.setFilterList(FilterPackBasic.getFilterPack())
|
||||||
}
|
}
|
||||||
|
@ -293,7 +295,13 @@ class NewPhotoEditActivity : SimpleActivity() {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
getSettingsModel(UiConfigTheme::class.java).theme = R.style.Imgly_Theme_NoFullscreen
|
val theme = if (isUsingSystemDarkTheme()) {
|
||||||
|
R.style.Theme_Imgly_NoFullscreen
|
||||||
|
} else {
|
||||||
|
R.style.Theme_Imgly_Light_NoFullscreen
|
||||||
|
}
|
||||||
|
|
||||||
|
getSettingsModel(UiConfigTheme::class.java).theme = theme
|
||||||
|
|
||||||
configure<PhotoEditorSaveSettings> {
|
configure<PhotoEditorSaveSettings> {
|
||||||
it.setExportFormat(ImageExportFormat.AUTO)
|
it.setExportFormat(ImageExportFormat.AUTO)
|
||||||
|
|
|
@ -226,10 +226,12 @@ class NewVideoEditActivity : SimpleActivity() {
|
||||||
VideoEditorBuilder(this)
|
VideoEditorBuilder(this)
|
||||||
.setSettingsList(settingsList)
|
.setSettingsList(settingsList)
|
||||||
.startActivityForResult(this, VESDK_EDIT_VIDEO)
|
.startActivityForResult(this, VESDK_EDIT_VIDEO)
|
||||||
|
|
||||||
|
settingsList.release()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun createVesdkSettingsList(): VideoEditorSettingsList {
|
private fun createVesdkSettingsList(): VideoEditorSettingsList {
|
||||||
val settingsList = VideoEditorSettingsList().apply {
|
val settingsList = VideoEditorSettingsList(false).apply {
|
||||||
configure<UiConfigFilter> {
|
configure<UiConfigFilter> {
|
||||||
it.setFilterList(FilterPackBasic.getFilterPack())
|
it.setFilterList(FilterPackBasic.getFilterPack())
|
||||||
}
|
}
|
||||||
|
@ -278,7 +280,13 @@ class NewVideoEditActivity : SimpleActivity() {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
getSettingsModel(UiConfigTheme::class.java).theme = R.style.Imgly_Theme_NoFullscreen
|
val theme = if (isUsingSystemDarkTheme()) {
|
||||||
|
R.style.Theme_Imgly_NoFullscreen
|
||||||
|
} else {
|
||||||
|
R.style.Theme_Imgly_Light_NoFullscreen
|
||||||
|
}
|
||||||
|
|
||||||
|
getSettingsModel(UiConfigTheme::class.java).theme = theme
|
||||||
|
|
||||||
configure<VideoEditorSaveSettings> {
|
configure<VideoEditorSaveSettings> {
|
||||||
it.allowFastTrim = true
|
it.allowFastTrim = true
|
||||||
|
|
|
@ -16,7 +16,7 @@ buildscript {
|
||||||
classpath 'com.android.tools.build:gradle:7.1.2'
|
classpath 'com.android.tools.build:gradle:7.1.2'
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
if (is_proprietary) {
|
if (is_proprietary) {
|
||||||
classpath 'ly.img.android.pesdk:plugin:9.2.0'
|
classpath 'ly.img.android.pesdk:plugin:10.0.1'
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
|
|
Loading…
Reference in a new issue