mirror of
https://github.com/MetaCubeX/ClashMetaForAndroid.git
synced 2024-11-22 05:16:08 +03:00
chore: adjust grid style
This commit is contained in:
parent
4467ef3351
commit
9587632c49
@ -40,9 +40,9 @@ class ProxyView(
|
||||
}
|
||||
|
||||
val textHeight = state.rect.height()
|
||||
val exceptHeight = (state.config.layoutPadding * 4 +
|
||||
val exceptHeight = (state.config.layoutPadding * 2 +
|
||||
state.config.contentPadding * 2 +
|
||||
textHeight * 4 +
|
||||
textHeight * 2 +
|
||||
state.config.textMargin).toInt()
|
||||
|
||||
val height = when (MeasureSpec.getMode(heightMeasureSpec)) {
|
||||
|
@ -21,9 +21,12 @@ class ProxyViewConfig(val context: Context, var proxyLine: Int) {
|
||||
get() = if (proxyLine==1) Color.TRANSPARENT else colorSurface
|
||||
|
||||
val layoutPadding = context.getPixels(R.dimen.proxy_layout_padding).toFloat()
|
||||
val contentPadding = context.getPixels(R.dimen.proxy_content_padding).toFloat()
|
||||
val textMargin = context.getPixels(R.dimen.proxy_text_margin)
|
||||
val textSize = context.getPixels(R.dimen.proxy_text_size).toFloat()
|
||||
val contentPadding
|
||||
get() = if (proxyLine==2) context.getPixels(R.dimen.proxy_content_padding).toFloat() else context.getPixels(R.dimen.proxy_content_padding_grid3).toFloat()
|
||||
val textMargin
|
||||
get() = if (proxyLine==2) context.getPixels(R.dimen.proxy_text_margin).toFloat() else context.getPixels(R.dimen.proxy_text_margin_grid3).toFloat()
|
||||
val textSize
|
||||
get() = if (proxyLine==2) context.getPixels(R.dimen.proxy_text_size).toFloat() else context.getPixels(R.dimen.proxy_text_size_grid3).toFloat()
|
||||
|
||||
val shadow = Color.argb(
|
||||
0x15,
|
||||
|
@ -65,9 +65,12 @@
|
||||
|
||||
<!-- Proxy Design -->
|
||||
<dimen name="proxy_layout_padding">3dp</dimen>
|
||||
<dimen name="proxy_content_padding">6dp</dimen>
|
||||
<dimen name="proxy_text_margin">5dp</dimen>
|
||||
<dimen name="proxy_text_size">11sp</dimen>
|
||||
<dimen name="proxy_content_padding">15dp</dimen>
|
||||
<dimen name="proxy_content_padding_grid3">12dp</dimen>
|
||||
<dimen name="proxy_text_margin">10dp</dimen>
|
||||
<dimen name="proxy_text_margin_grid3">5dp</dimen>
|
||||
<dimen name="proxy_text_size">12sp</dimen>
|
||||
<dimen name="proxy_text_size_grid3">11sp</dimen>
|
||||
<dimen name="proxy_card_radius">5dp</dimen>
|
||||
<dimen name="proxy_card_offset">0dp</dimen>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user