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

Made this look more like a tiling window manager with transparent terminals. #334

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
63 changes: 61 additions & 2 deletions app/src/main/java/ohi/andre/consolelauncher/UIManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,8 @@ private void updateText(Label l, CharSequence s) {
}
}

private boolean is_simons_sexy_view_enabled = true;

private SuggestionsManager suggestionsManager;

private TextView terminalView;
Expand Down Expand Up @@ -1339,7 +1341,9 @@ public void onGlobalLayout() {
toolbarView = inputOutputView.findViewById(R.id.tools_view);
hideToolbarNoInput = XMLPrefsManager.getBoolean(Toolbar.hide_toolbar_no_input);

applyBgRect(toolbarView, bgRectColors[TOOLBAR_BGCOLOR_INDEX], bgColors[TOOLBAR_BGCOLOR_INDEX], margins[TOOLBAR_MARGINS_INDEX], strokeWidth, cornerRadius);
if( !is_simons_sexy_view_enabled ) {
applyBgRect(toolbarView, bgRectColors[TOOLBAR_BGCOLOR_INDEX], bgColors[TOOLBAR_BGCOLOR_INDEX], margins[TOOLBAR_MARGINS_INDEX], strokeWidth, cornerRadius);
}
}

mTerminalAdapter = new TerminalManager(terminalView, inputView, prefixView, submitView, backView, nextView, deleteView, pasteView, context, mainPack, executer);
Expand All @@ -1352,7 +1356,10 @@ public void onGlobalLayout() {
v.clearFocus();
}
});
applyBgRect(sv, bgRectColors[SUGGESTIONS_BGCOLOR_INDEX], bgColors[SUGGESTIONS_BGCOLOR_INDEX], margins[SUGGESTIONS_MARGINS_INDEX], strokeWidth, cornerRadius);

if( !is_simons_sexy_view_enabled ) {
applyBgRect(sv, bgRectColors[SUGGESTIONS_BGCOLOR_INDEX], bgColors[SUGGESTIONS_BGCOLOR_INDEX], margins[SUGGESTIONS_MARGINS_INDEX], strokeWidth, cornerRadius);
}

LinearLayout suggestionsView = (LinearLayout) rootView.findViewById(R.id.suggestions_group);

Expand All @@ -1371,6 +1378,58 @@ public void onGlobalLayout() {
int drawTimes = XMLPrefsManager.getInt(Ui.text_redraw_times);
if(drawTimes <= 0) drawTimes = 1;
OutlineTextView.redrawTimes = drawTimes;

if( is_simons_sexy_view_enabled ) {
int floatingWindowcolor = Color.argb(200, 0, 0, 0 );

int outsidePadding = 15;
int insidePadding = 5;

// Set our background picture
rootView.setBackgroundResource(R.drawable.jellyfish);

//--------------------------//
// Prettier Device section. //
//--------------------------//

// Set the margins for the device info section.
LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) lViewsParent.getLayoutParams();
params.setMargins( outsidePadding, outsidePadding, outsidePadding, outsidePadding / 2 );
lViewsParent.setLayoutParams( params );

// Set the device info's background colour to make it look like a floating window.
//lViewsParent.setBackgroundColor(Color.argb(127, 0, 0, 255));
lViewsParent.setBackgroundColor( floatingWindowcolor );

// Make the text a little further from the border.
lViewsParent.setPadding( insidePadding, insidePadding, insidePadding, insidePadding );

//----------------------------//
// Prettier Terminal section. //
//----------------------------//
View terminalGroupView = inputOutputView.findViewById(R.id.terminal_group);

// Set the margin
params = (LinearLayout.LayoutParams) terminalGroupView.getLayoutParams();
params.setMargins( outsidePadding, outsidePadding / 2, outsidePadding, outsidePadding );
terminalGroupView.setLayoutParams( params );

// Set the terminal's background colour to make it look like a floating window.
terminalGroupView.setBackgroundColor( floatingWindowcolor );

// Make the text a little further from the border.
terminalGroupView.setPadding(insidePadding,insidePadding, insidePadding, insidePadding);

//-------------------//
// Prettier Buttons. //
//-------------------//
// Set the background colour for these too.
View toolsView = inputOutputView.findViewById(R.id.tools_view);
toolsView.setBackgroundColor( floatingWindowcolor );

View suggestionsContainerView = inputOutputView.findViewById(R.id.suggestions_container);
suggestionsContainerView.setBackgroundColor( floatingWindowcolor );
}
}

public static int[] getListOfIntValues(String values, int length, int defaultValue) {
Expand Down
Binary file added app/src/main/res/drawable/jellyfish.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
193 changes: 105 additions & 88 deletions app/src/main/res/layout/about_device_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,94 +4,111 @@
android:layout_height="wrap_content"
android:orientation="vertical">

<ohi.andre.consolelauncher.tuils.OutlineTextView android:id="@+id/tv0"
<LinearLayout
android:id="@+id/tv_linear_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="true"
android:focusableInTouchMode="true"
android:clickable="true"

android:scrollbarAlwaysDrawVerticalTrack="true"
android:scrollbars="vertical" />

<ohi.andre.consolelauncher.tuils.OutlineTextView android:id="@+id/tv1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="true"
android:focusableInTouchMode="true"
android:clickable="true"

android:scrollbarAlwaysDrawVerticalTrack="true"
android:scrollbars="vertical" />

<ohi.andre.consolelauncher.tuils.OutlineTextView android:id="@+id/tv2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="true"
android:focusableInTouchMode="true"
android:clickable="true"

android:scrollbarAlwaysDrawVerticalTrack="true"
android:scrollbars="vertical" />

<ohi.andre.consolelauncher.tuils.OutlineTextView android:id="@+id/tv3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="true"
android:focusableInTouchMode="true"
android:clickable="true"

android:scrollbarAlwaysDrawVerticalTrack="true"
android:scrollbars="vertical" />

<ohi.andre.consolelauncher.tuils.OutlineTextView android:id="@+id/tv4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="true"
android:focusableInTouchMode="true"
android:clickable="true"

android:scrollbarAlwaysDrawVerticalTrack="true"
android:scrollbars="vertical" />

<ohi.andre.consolelauncher.tuils.OutlineTextView android:id="@+id/tv5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="true"
android:focusableInTouchMode="true"
android:clickable="true"

android:scrollbarAlwaysDrawVerticalTrack="true"
android:scrollbars="vertical" />

<ohi.andre.consolelauncher.tuils.OutlineTextView android:id="@+id/tv6"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="true"
android:focusableInTouchMode="true"
android:clickable="true"

android:scrollbarAlwaysDrawVerticalTrack="true"
android:scrollbars="vertical" />

<ohi.andre.consolelauncher.tuils.OutlineTextView android:id="@+id/tv7"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="true"
android:focusableInTouchMode="true"
android:clickable="true"

android:scrollbarAlwaysDrawVerticalTrack="true"
android:scrollbars="vertical" />

<ohi.andre.consolelauncher.tuils.OutlineTextView android:id="@+id/tv8"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="true"
android:focusableInTouchMode="true"
android:clickable="true"

android:scrollbarAlwaysDrawVerticalTrack="true"
android:scrollbars="vertical" />
android:layout_height="match_parent"
android:orientation="vertical">

<ohi.andre.consolelauncher.tuils.OutlineTextView
android:id="@+id/tv0"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:focusableInTouchMode="true"

android:scrollbarAlwaysDrawVerticalTrack="true"
android:scrollbars="vertical" />

<ohi.andre.consolelauncher.tuils.OutlineTextView
android:id="@+id/tv1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:focusableInTouchMode="true"

android:scrollbarAlwaysDrawVerticalTrack="true"
android:scrollbars="vertical" />

<ohi.andre.consolelauncher.tuils.OutlineTextView
android:id="@+id/tv2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:focusableInTouchMode="true"

android:scrollbarAlwaysDrawVerticalTrack="true"
android:scrollbars="vertical" />

<ohi.andre.consolelauncher.tuils.OutlineTextView
android:id="@+id/tv3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:focusableInTouchMode="true"

android:scrollbarAlwaysDrawVerticalTrack="true"
android:scrollbars="vertical" />

<ohi.andre.consolelauncher.tuils.OutlineTextView
android:id="@+id/tv4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:focusableInTouchMode="true"

android:scrollbarAlwaysDrawVerticalTrack="true"
android:scrollbars="vertical" />

<ohi.andre.consolelauncher.tuils.OutlineTextView
android:id="@+id/tv5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:focusableInTouchMode="true"

android:scrollbarAlwaysDrawVerticalTrack="true"
android:scrollbars="vertical" />

<ohi.andre.consolelauncher.tuils.OutlineTextView
android:id="@+id/tv6"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:focusableInTouchMode="true"

android:scrollbarAlwaysDrawVerticalTrack="true"
android:scrollbars="vertical" />

<ohi.andre.consolelauncher.tuils.OutlineTextView
android:id="@+id/tv7"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:focusableInTouchMode="true"

android:scrollbarAlwaysDrawVerticalTrack="true"
android:scrollbars="vertical" />

<ohi.andre.consolelauncher.tuils.OutlineTextView
android:id="@+id/tv8"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:focusableInTouchMode="true"

android:scrollbarAlwaysDrawVerticalTrack="true"
android:scrollbars="vertical" />

</LinearLayout>

</LinearLayout>
Loading