Kaydet (Commit) 3deac969 authored tarafından Mert Tümer's avatar Mert Tümer Kaydeden (comit) Thorsten Behrens

[Pardus] tdf#106326 ability to change font background color

This patch is sponsored by ULAKBIM/PARDUS project.
Signed-off-by: 's avatarMert Tümer <merttumer7@gmail.com>

Change-Id: I4dfbb9e35214e4d4a9aa6dca1ce3d5d2604218a9
Reviewed-on: https://gerrit.libreoffice.org/48270Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarThorsten Behrens <Thorsten.Behrens@CIB.de>
üst 976b48e9
......@@ -110,7 +110,8 @@
</LinearLayout>
<include layout="@layout/toolbar_bottom"/>
<include layout="@layout/toolbar_color_picker"/>
<include android:id="@+id/toolbar_back_color_picker" layout="@layout/toolbar_color_picker"/>
<include android:id="@+id/toolbar_color_picker" layout="@layout/toolbar_color_picker"/>
<RelativeLayout
android:id="@+id/loadingPanel"
......
......@@ -197,6 +197,34 @@
/>
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/font_back_color_picker"
android:padding="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Font Back Color"
android:paddingBottom="12dp"
android:paddingTop="12dp"
android:textSize="14sp"
android:gravity="center_vertical"
android:textColor="@color/fontBlack"
android:layout_alignParentLeft="true"
/>
<ImageButton
android:id="@+id/font_back_color_picker_button"
android:layout_width="24dp"
android:layout_height="24dp"
android:gravity="center_vertical"
android:paddingBottom="12dp"
android:paddingTop="12dp"
android:layout_alignParentRight="true"
/>
</RelativeLayout>
</LinearLayout>
</ScrollView>
......
......@@ -3,7 +3,6 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/toolbar_color_picker"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
......
......@@ -269,6 +269,8 @@ public class InvalidationHandler implements Document.MessageCallback, Office.Mes
mContext.getFormattingController().onToggleStateChanged(Document.NUMBERED_LIST, pressed);
} else if (parts[0].equals(".uno:Color")) {
mContext.getFontController().colorPaletteListener.updateColorPickerPosition(Integer.parseInt(value));
} else if (parts[0].equals(".uno:BackColor")) {
mContext.getFontController().backColorPaletteListener.updateColorPickerPosition(Integer.parseInt(value));
} else if (parts[0].equals(".uno:StatePageNumber")) {
// get the total page number and compare to the current value and update accordingly
String[] splitStrings = parts[1].split(" ");
......
......@@ -89,6 +89,7 @@ public class LibreOfficeMainActivity extends AppCompatActivity implements Settin
BottomSheetBehavior bottomToolbarSheetBehavior;
BottomSheetBehavior toolbarColorPickerBottomSheetBehavior;
BottomSheetBehavior toolbarBackColorPickerBottomSheetBehavior;
private FormattingController mFormattingController;
private ToolbarController mToolbarController;
private FontController mFontController;
......@@ -237,10 +238,13 @@ public class LibreOfficeMainActivity extends AppCompatActivity implements Settin
LinearLayout bottomToolbarLayout = findViewById(R.id.toolbar_bottom);
LinearLayout toolbarColorPickerLayout = findViewById(R.id.toolbar_color_picker);
LinearLayout toolbarBackColorPickerLayout = findViewById(R.id.toolbar_back_color_picker);
bottomToolbarSheetBehavior = BottomSheetBehavior.from(bottomToolbarLayout);
toolbarColorPickerBottomSheetBehavior = BottomSheetBehavior.from(toolbarColorPickerLayout);
toolbarBackColorPickerBottomSheetBehavior = BottomSheetBehavior.from(toolbarBackColorPickerLayout);
bottomToolbarSheetBehavior.setHideable(true);
toolbarColorPickerBottomSheetBehavior.setHideable(true);
toolbarBackColorPickerBottomSheetBehavior.setHideable(true);
}
// Loads a new Document
......@@ -568,6 +572,7 @@ public class LibreOfficeMainActivity extends AppCompatActivity implements Settin
public void run() {
bottomToolbarSheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);
toolbarColorPickerBottomSheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);
toolbarBackColorPickerBottomSheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);
findViewById(R.id.search_toolbar).setVisibility(View.GONE);
isFormattingToolbarOpen=false;
isSearchToolbarOpen=false;
......@@ -613,6 +618,7 @@ public class LibreOfficeMainActivity extends AppCompatActivity implements Settin
showBottomToolbar();
findViewById(R.id.formatting_toolbar).setVisibility(View.GONE);
toolbarColorPickerBottomSheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);
toolbarBackColorPickerBottomSheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);
findViewById(R.id.search_toolbar).setVisibility(View.VISIBLE);
hideSoftKeyboardDirect();
isFormattingToolbarOpen=false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment